Skip to main content

Compare secrets stored in AWS Secrets Manager

Project description

aws-cmp-secrets

aws_cmp_secrets is a script which enables you to compare secrets stored in AWS Secrets Manager and show difference between the two. It also supports MFA authentication(interactive), should policy require it.

It utilizes boto3 under the hood. Also, you need AWS credentials in your environment(one way or another) and appropriate permissions to access secrets you want to compare.

NOTE that CLI args and output format might change in the future(probably in 10 years from now or so). Ideas to make output format more useable and user-friendly are welcome, I think.

Example usage

# with interactive MFA authentication and version IDs
aws_cmp_secrets \
    -i \
    -s1 my/secret/foo \
    --version-id1 12345678-1234-1234-1234-123456789012 \
    -s2 my/secret/foo \
    --version-id2 12345678-1234-1234-1234-333333333333
MFA devices:
0: arn:aws:iam::111111111111:mfa/mfa-device1
Choose which MFA device you want to use(0..0): 0
Enter MFA token: 123456
---
a: secret 'my/secret/foo'@'12345678-1234-1234-1234-123456789012'
b: secret 'my/secret/foo'@'12345678-1234-1234-1234-333333333333'
a: 'SOME_KEY':'foo_value'
b: 'SOME_KEY':'bar_value'
a: 'OTHER_KEY':'some_value'
b: '**ABSENT**':'**ABSENT**'

# with secret values masked
aws_cmp_secrets \
    -m \
    -s1 my/secret/foo \
    -s2 my/secret/bar
a: secret 'my/secret/foo'@'AWSCURRENT'
b: secret 'my/secret/bar'@'AWSCURRENT'
a: 'SOME_KEY':'**MASKED**'
b: 'SOME_KEY':'**MASKED**'

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aws_cmp_secrets-0.0.1.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aws_cmp_secrets-0.0.1-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file aws_cmp_secrets-0.0.1.tar.gz.

File metadata

  • Download URL: aws_cmp_secrets-0.0.1.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for aws_cmp_secrets-0.0.1.tar.gz
Algorithm Hash digest
SHA256 3c28cffbbc67ca5ad34520ba9516b5cd1ea8738aa853e5aae6dbc9fcb7d9e0e4
MD5 456c8c2ca9005b789d19d5436d7e04ea
BLAKE2b-256 770eb99b3631f6c8fd7f6d5ce635a4cd53a705ae8b48142138f1f33b7120a55c

See more details on using hashes here.

Provenance

The following attestation bundles were made for aws_cmp_secrets-0.0.1.tar.gz:

Publisher: release.yml on zstyblik/aws-cmp-secrets

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file aws_cmp_secrets-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for aws_cmp_secrets-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5905db9afba041c975b13c217adfa196e4e63b0a2f5162187fc3d19ccb982650
MD5 15c493e0acb7cbcd65f7715adcc1dfa1
BLAKE2b-256 19d4a1f4146d7892261c4d718cc1d9481d592eb25cf212ce1ba84cae8a91b46b

See more details on using hashes here.

Provenance

The following attestation bundles were made for aws_cmp_secrets-0.0.1-py3-none-any.whl:

Publisher: release.yml on zstyblik/aws-cmp-secrets

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page