fix(dex): fetching changes for mounting dex sa token as projected volume mount - #1305
Conversation
…ume mount Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: svghadi The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com>
Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com>
|
/lgtm |
What type of PR is this?
/kind bug
What does this PR do / why we need it:
Dex server pod restarts the dex server process whenever the static clientSecret changes. This causes existing token verification to fail, as the signing tokens stored in memory gets deleted. To overcome this limitation, external storage options (kubernetes/etcd) was evaluated, though it solved the problem of loosing the dex data, it requires additional care and encryption mechanism to store the sensitive data securely.
Using projected tokens, helps in token rotation directly in the disk by the kubelet and by making an enhancement in dex to read these short-lived tokens directly from the file, helps to avoid the dex server process restarts. It also simplifies the current token rotation mechanism which requires the operator to continuosly look at the service account secrets for any expiry and use the TokenRequest API to generate the token stored in a kubernetes Secret object.
Have you updated the necessary documentation?
N/A
Which issue(s) this PR fixes:
Fixes
https://redhat.atlassian.net/browse/GITOPS-10364
https://redhat.atlassian.net/browse/GITOPS-10429
Test acceptance criteria:
How to test changes / Special notes to the reviewer: