Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Package Request] - pass #815

Open
oallauddin opened this issue Oct 11, 2024 · 0 comments
Open

[Package Request] - pass #815

oallauddin opened this issue Oct 11, 2024 · 0 comments

Comments

@oallauddin
Copy link

oallauddin commented Oct 11, 2024

What package is missing from Amazon Linux 2023? Please describe and include package name.
pass

Is this an update to existing package or new package request?
New package

Is this package available in Amazon Linux 2? If it is available via external sources such as EPEL, please specify.
No

Any additional information you'd like to include. (use-cases, etc)
The Fedora 39 distribution seems to be compatible.
Would prefer an official package for Amazon Linux 2023.
https://packages.fedoraproject.org/pkgs/pass/pass/

Use case is mainly to support AWS Signer with notation image signing.
Notation wants a docker credential store for notation login.
https://notaryproject.dev/docs/user-guides/how-to/registry-authentication/

pass seems to be the only Linux based credential store supported by docker that does not require a user interface.
https://stackoverflow.com/a/56962332

sudo dnf install -y git-core gnupg2 qrencode tree curl
sudo dnf swap -y gnupg2-minimal gnupg2-full  
sudo dnf swap -y curl-minimal curl-full
curl https://kojipkgs.fedoraproject.org//packages/pass/1.7.4/8.fc39/noarch/pass-1.7.4-8.fc39.noarch.rpm --output pass-1.7.4-8.fc39.noarch.rpm
sudo rpm -U pass-1.7.4-8.fc39.noarch.rpm

# download and install docker credential helper for pass
# configure gpg key that will be used by pass
# initialize pass to use the gpg key

aws ecr get-login-password --region $AWS_REGION --profile $AWS_PROFILE | docker login --password-stdin --username AWS "${account}.dkr.ecr.us-east-1.amazonaws.com"
aws ecr get-login-password --region $AWS_REGION --profile $AWS_PROFILE | notation login --password-stdin --username AWS "${account}.dkr.ecr.us-east-1.amazonaws.com"

docker pull public.ecr.aws/docker/library/alpine:latest
docker tag public.ecr.aws/docker/library/alpine:latest ${account}.dkr.ecr.us-east-1.amazonaws.com/linux/alpine:latest
docker push ${account}.dkr.ecr.us-east-1.amazonaws.com/linux/alpine:latest

signing_profile="arn:aws-us-gov:signer:us-east-1:${account}:/signing-profiles/sp20240810150789547600000001"
digest=$(crane digest  ${account}.dkr.ecr.us-east-1.amazonaws.com/linux/alpine:latest)
image="${account}.dkr.ecr.us-east-1.amazonaws.com/linux/alpine@${digest}"
notation sign ${image} --plugin "com.amazonaws.signer.notation.plugin" --id "${signing_profile}" --plugin-config "aws-profile=${AWS_PROFILE}" --plugin-config "aws-region=${AWS_REGION}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant