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

Add support for GPG key sourced from GitHub #34301

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chomatdam
Copy link

@chomatdam chomatdam commented Nov 7, 2023

Description

The pgp_key property is used by a few resources to encrypt outputs containing sensitive data around user credentials. Currently, two ways are supported:

  • inline GPG public key
  • Keybase username, e.g. keybase:chomatdam

This pull request improves the existing feature by pulling the latest GPG public key associated with a GitHub username.

Resources

  • aws_iam_access_key
  • aws_iam_user_login_profile

Example

resource "aws_iam_access_key" "chomatdam" {
  user    = aws_iam_user.chomatdam.name
  pgp_key = "github:chomatdam"
}

Added Dependencies

Unit Tests

TestFetchLatestGitHubPublicKey

Acceptance Tests

% make testacc TESTS=TestAccIAMUserLoginProfile_github PKG=iam
% make testacc TESTS=TestAccIAMAccessKey_encryptedByGitHubGPGKey PKG=iam

Build

✅ Provider built and real-life tested 🙂

Copy link

github-actions bot commented Nov 7, 2023

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added size/S Managed by automation to categorize the size of a PR. service/iam Issues and PRs that pertain to the iam service. labels Nov 7, 2023
@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label Nov 7, 2023
@github-actions github-actions bot added the documentation Introduces or discusses updates to documentation. label Nov 7, 2023
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome @chomatdam 👋

It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTOR guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.

Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.

Thanks again, and welcome to the community! 😃

@justinretzolk justinretzolk added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Nov 7, 2023
@github-actions github-actions bot added size/M Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. and removed size/S Managed by automation to categorize the size of a PR. labels Nov 7, 2023
Copy link

github-actions bot commented Nov 8, 2023

Thank you for your contribution! 🚀

Please note that typically Go dependency changes are handled in this repository by dependabot or the maintainers. This is to prevent pull request merge conflicts and further delay reviews of contributions. Remove any changes to the go.mod or go.sum files and commit them into this pull request.

Additional details:

  • Check open pull requests with the dependencies label to view other dependency updates.
  • If this pull request includes an update the AWS Go SDK (or any other dependency) version, only updates submitted via dependabot will be merged. This pull request will need to remove these changes and will need to be rebased after the existing dependency update via dependabot has been merged for this pull request to be reviewed.
  • If this pull request is for supporting a new AWS service:
    • Ensure the new AWS service changes are following the Contributing Guide section on new services, in particular that the dependency addition and initial provider support are in a separate pull request from other changes (e.g. new resources). Contributions not following this item will not be reviewed until the changes are split.
    • If this pull request is already a separate pull request from the above item, you can ignore this message.

@github-actions github-actions bot added size/L Managed by automation to categorize the size of a PR. and removed size/M Managed by automation to categorize the size of a PR. labels Nov 8, 2023
@chomatdam chomatdam changed the title [WIP] Add support for GPG key sourced from GitHub Add support for GPG key sourced from GitHub Nov 8, 2023
@chomatdam chomatdam changed the title Add support for GPG key sourced from GitHub Add support for PGP key sourced from GitHub Nov 8, 2023
@chomatdam chomatdam changed the title Add support for PGP key sourced from GitHub Add support for GPG key sourced from GitHub Nov 8, 2023
@chomatdam
Copy link
Author

@justinretzolk is there anything else I should add to this PR or just about being patient until it gets reviewed/merged? 🙂

@chomatdam
Copy link
Author

@justinretzolk it has been a couple of months, is there anything on my end to get it merged, or you take over this PR when you have time?

@justinretzolk
Copy link
Member

Hey @chomatdam 👋 Thank you for your contribution, and for checking in here! Sorry to have missed your last ping. I can't speak to when this will be prioritized just yet -- we base our prioritization on the count of 👍 reactions and a few other considerations. We have a document (found here) with a bit more information if you're interested. In short, there's nothing that you need to do at this time 🙂.

Update doc and changelog

Move around code for unit testing

Fix unit test

Add acceptance test 1/2

Add acceptance test 2/2

Signed-off-by: Damien Chomat <[email protected]>
@chomatdam
Copy link
Author

commits squashed + conflicts resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. service/iam Issues and PRs that pertain to the iam service. size/L Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants