{"id":18765324,"url":"https://github.com/setasign/setapdf-signer-addon-aws-kms","last_synced_at":"2026-01-26T13:07:21.180Z","repository":{"id":37979242,"uuid":"330598997","full_name":"Setasign/SetaPDF-Signer-Addon-AWS-KMS","owner":"Setasign","description":"A SetaPDF-Signer component signature module for the AWS Key Management Service.","archived":false,"fork":false,"pushed_at":"2024-03-06T13:11:50.000Z","size":182,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-11T21:08:54.152Z","etag":null,"topics":["aws-kms","digital-signature","pdf","php","setapdf","setapdf-signer","signature"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Setasign.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-01-18T08:19:06.000Z","updated_at":"2023-08-14T06:03:06.000Z","dependencies_parsed_at":"2024-01-16T10:28:36.405Z","dependency_job_id":"c0559102-177e-445a-b442-d53f3b35b788","html_url":"https://github.com/Setasign/SetaPDF-Signer-Addon-AWS-KMS","commit_stats":{"total_commits":26,"total_committers":4,"mean_commits":6.5,"dds":0.6153846153846154,"last_synced_commit":"04627719e0ef00d6a9f7766223490bad42bcf3d2"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Setasign%2FSetaPDF-Signer-Addon-AWS-KMS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Setasign%2FSetaPDF-Signer-Addon-AWS-KMS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Setasign%2FSetaPDF-Signer-Addon-AWS-KMS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Setasign%2FSetaPDF-Signer-Addon-AWS-KMS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Setasign","download_url":"https://codeload.github.com/Setasign/SetaPDF-Signer-Addon-AWS-KMS/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248665746,"owners_count":21142123,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws-kms","digital-signature","pdf","php","setapdf","setapdf-signer","signature"],"created_at":"2024-11-07T18:33:34.837Z","updated_at":"2026-01-26T13:07:21.174Z","avatar_url":"https://github.com/Setasign.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"#  SetaPDF-Signer component module for the AWS KMS.\n\nThis package offers a module for the [SetaPDF-Signer](https://www.setasign.com/signer) component that allow you to use\nthe [AWS Key Management Service](https://aws.amazon.com/kms/) to **digital sign PDF documents in pure PHP**.\n\n## Requirements\n\nThis package uses the official\n[AWS SDK for PHP Version 3](https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/welcome.html)\nto communicate with the KMS. You need appropriate credentials.\n\nYou also need a X.509 certificates related to your stored keys. To create a self-signed certificate for testing purpose\nor to create a CSR for the certificate authority of your choice, you can use a tool we prepared\n[here](https://github.com/Setasign/Cloud-KMS-CSR).\n\nThe current version of the package is developed and tested on PHP \u003e= 8.1 up to PHP 8.5. Requirements of the \n[SetaPDF-Signer](https://www.setasign.com/signer) component can be found \n[here](https://manuals.setasign.com/setapdf-signer-manual/getting-started/#index-1).\n\n## Installation\nAdd following to your composer.json:\n\n```json\n{\n    \"require\": {\n        \"setasign/setapdf-signer-addon-aws-kms\": \"^1.0\"\n    },\n    \"repositories\": [\n        {\n            \"type\": \"composer\",\n            \"url\": \"https://www.setasign.com/downloads/\"\n        }\n    ]\n}\n```\n\nand execute `composer update`. You need to define the `repository` to evaluate the dependency to the\n[SetaPDF-Signer](https://www.setasign.com/signer) component\n(see [here](https://getcomposer.org/doc/faqs/why-can%27t-composer-load-repositories-recursively.md) for more details).\n\nThe Setasign repository requires authentication data: You can use your credentials\nof your account at [setasign.com](https://www.setasign.com) to which your licenses\nare assigned or use an access token which you can create in your personal \n[composer settings](https://www.setasign.com/my-setasign/composer-settings/#bearer-authentication) \non setasign.com.\nSee [here](https://getcomposer.org/doc/articles/authentication-for-private-packages.md#http-basic)\nfor more options for authentication with composer.\n\n**You have to define your credentials for AWS KMS as documented \n[here](https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/guide_credentials_default_chain.html).**\n\n## Usage\n\nAll classes in this package are located in the namespace `setasign\\SetaPDF\\Signer\\Module\\AwsKms`.\n\n### The `Module` class\n\nThis is the main signature module which can be used with the [SetaPDF-Signer](https://www.setasign.com/signer)\ncomponent. \n\nA simple complete signature process would look like this:\n\n```php\nuse Aws\\Kms\\KmsClient;\nuse setasign\\SetaPDF\\Signer\\Module\\AwsKMS\\Module;\nuse setasign\\SetaPDF2\\Core\\Document;\nuse setasign\\SetaPDF2\\Core\\Writer\\FileWriter;\nuse setasign\\SetaPDF2\\Signer\\Signer;\n\n$kmsClient = new KmsClient([\n    'region' =\u003e $region,\n    'version' =\u003e $version,\n]);\n$awsKmsModule = new Module($keyId, $kmsClient);\n\n$cert = file_get_contents('your-cert.crt');\n$awsKmsModule-\u003esetCertificate($cert);\n$awsKmsModule-\u003esetSignatureAlgorithm($algorithm);\n\n// the file to sign\n$fileToSign = __DIR__ . '/Laboratory-Report.pdf';\n\n// create a writer instance\n$writer = new FileWriter('signed.pdf');\n// create the document instance\n$document = Document::loadByFilename($fileToSign, $writer);\n\n// create the signer instance\n$signer = new Signer($document);\n$signer-\u003esign($awsKmsModule);\n```\n\nMake sure that you pass `$algorithm` value which match the configuration of the key in the KMS.\n\n## License\n\nThis package is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsetasign%2Fsetapdf-signer-addon-aws-kms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsetasign%2Fsetapdf-signer-addon-aws-kms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsetasign%2Fsetapdf-signer-addon-aws-kms/lists"}