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

feat: Allow OIDC root CA thumbprint to be included/excluded #2778

Conversation

danielfrankcom
Copy link
Contributor

@danielfrankcom danielfrankcom commented Oct 12, 2023

Description

This change adds a new include_oidc_root_ca_thumbprint input which allows the default root CA thumbprint to be included in or excluded from the OIDC thumbprint list.

Motivation and Context

As per #2768, I am not able to reliably retrieve the root CA thumbprint within a corporate environment where HTTPS traffic is intercepted and inspected.

I need a way to configure the EKS cluster to use the correct AWS CA thumbprint, rather than expecting the module to be able to query the thumbprint itself.

I could add the correct thumbprint to the existing custom_oidc_thumbprints list without this change, but there is a ~50% chance the root CA thumbprint will change every time I apply which creates churn in the configuration.

The wording of this input is based on the eks_oidc_root_ca_thumbprint input from an earlier version of this module.

Breaking Changes

The default value aligns with the current behavior, and the new input is not required. There should be no breaking change.

How Has This Been Tested?

  • I have executed pre-commit run -a on my pull request

  • I have updated at least one of the examples/* to demonstrate and validate my change(s)

  • I have tested and validated these changes using one or more of the provided examples/* projects

I have not updated the examples/* since they do not currently use custom thumbprints, and most users would not need to I would think.

I tested this change by deploying a simple cluster with no configured OIDC inputs. The cluster was deployed with the single root CA thumbprint.

I then added the following configuration:

include_oidc_root_ca_thumbprint = false

When I applied the change, the resulting cluster had no thumbprints at all.

I then added the following configuration:

include_oidc_root_ca_thumbprint = false
custom_oidc_thumbprints   = [
  "9e99a48a9960b14926bb7f3b02e22da2b0ab7280"
]

When I applied the change, the resulting cluster had only the single custom thumbprint.

@denniskniep
Copy link

Great feature, this is awesome 👍

@bryantbiggs bryantbiggs changed the title fix: Allow OIDC root CA thumbprint to be included/excluded feat: Allow OIDC root CA thumbprint to be included/excluded Nov 14, 2023
Copy link
Member

@bryantbiggs bryantbiggs left a comment

Choose a reason for hiding this comment

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

thank you! there should be additional changes in this space that makes this easier, but for the existing solution I think its worthwhile to add - so here we go 🚀 !

@bryantbiggs bryantbiggs merged commit 091c680 into terraform-aws-modules:master Nov 14, 2023
18 checks passed
antonbabenko pushed a commit that referenced this pull request Nov 14, 2023
## [19.20.0](v19.19.1...v19.20.0) (2023-11-14)

### Features

* Allow OIDC root CA thumbprint to be included/excluded ([#2778](#2778)) ([091c680](091c680))
@antonbabenko
Copy link
Member

This PR is included in version 19.20.0 🎉

Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OIDC provider thumbprints inconsistent and sometimes incorrect
4 participants