kneemaa / github-action-rotate-aws-secrets

Github Action to rotate AWS Access Keys stored in a repositories secrets
MIT License
37 stars 19 forks source link

Support organization secrets #9

Open Alw3ys opened 3 years ago

Alw3ys commented 3 years ago

Add support to manage organization secrets

kneemaa commented 3 years ago

@Alw3ys can you elaborate what is missing for organization secrets?

Alw3ys commented 3 years ago

Hi @kneemaa,

Thanks for your reply! and sure!

Currently there's only support to update repositories actions secret. It's the way the api is called, so if you look at your code at: https://github.com/kneemaa/github-action-rotate-aws-secrets/blob/master/rotate_keys.py#L137 https://api.github.com/repos/{owner_repo}/actions/secrets/{key_name}

In order to support organization secrets another endpoint would need to be called: https://api.github.com/orgs/{org}/actions/secrets/{key_name} Here you can find the github documentation reference: https://docs.github.com/en/rest/reference/actions#create-or-update-an-organization-secret

If you have any further questions, please feel free to ask!

Alw3ys commented 3 years ago

For reference I've created a PR with the feature changes,

It's not tested but that should do it for what, Otherwise I hope it gets you a better understand of what feature request I'm asking.

https://github.com/kneemaa/github-action-rotate-aws-secrets/pull/10

pukkancs commented 1 year ago

Is there any chance this FEATURE gets implemented?

This works great, but AWS secret for the GitHub Actions user is normally stored on an organisation level instead of duplicating it into every repo with actions.

Would be a neat addition.