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

filters/auth/grant: support client id and secret file placeholders #2246

Merged
merged 1 commit into from
Mar 7, 2023

Conversation

AlexanderYastrebov
Copy link
Member

This change enables {host} placeholder in the client id and secret filenames.

E.g. for the request to foo.example.org when flag values are -oauth2-client-id-file=/var/run/secrets/{host}-client-id and -oauth2-client-secret-file=/var/run/secrets/{host}-client-secret the client id and secret files would be /var/run/secrets/foo.example.org-client-id and /var/run/secrets/foo.example.org-client-secret respectively.

@AlexanderYastrebov AlexanderYastrebov marked this pull request as draft March 3, 2023 18:04
@AlexanderYastrebov AlexanderYastrebov force-pushed the filters/auth/grant-client-id-template branch from 7af06c6 to eeb6839 Compare March 6, 2023 11:11
This change enables `{host}` placeholder in the client id and secret filenames.

E.g. for the request to `foo.example.org` when flag values are `-oauth2-client-id-file=/var/run/secrets/{host}-client-id` and
`-oauth2-client-secret-file=/var/run/secrets/{host}-client-secret`
the client id and secret files would be `/var/run/secrets/foo.example.org-client-id` and
`/var/run/secrets/foo.example.org-client-secret` respectively.

Signed-off-by: Alexander Yastrebov <alexander.yastrebov@zalando.de>
@AlexanderYastrebov AlexanderYastrebov force-pushed the filters/auth/grant-client-id-template branch from eeb6839 to d201006 Compare March 6, 2023 18:10
if err == nil {
rt.t.Logf("\n%v", rt.responseString(resp))
} else {
rt.t.Logf("response err: %v", err)
Copy link
Member

Choose a reason for hiding this comment

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

nice

@AlexanderYastrebov AlexanderYastrebov marked this pull request as ready for review March 6, 2023 19:52
@szuecs
Copy link
Member

szuecs commented Mar 7, 2023

👍

1 similar comment
@AlexanderYastrebov
Copy link
Member Author

👍

@AlexanderYastrebov AlexanderYastrebov merged commit 5c9d7c2 into master Mar 7, 2023
@AlexanderYastrebov AlexanderYastrebov deleted the filters/auth/grant-client-id-template branch March 7, 2023 16:23
AlexanderYastrebov added a commit that referenced this pull request Mar 4, 2024
Followup on #2246

Signed-off-by: Alexander Yastrebov <alexander.yastrebov@zalando.de>
AlexanderYastrebov added a commit that referenced this pull request Mar 4, 2024
…2971)

Followup on #2246

Signed-off-by: Alexander Yastrebov <alexander.yastrebov@zalando.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants