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

Read oauth2 secret from file #293

Merged
merged 5 commits into from
Apr 26, 2021

Conversation

roidelapluie
Copy link
Member

cc @LeviHarrison

I still need to add tests.

Signed-off-by: Julien Pivotto roidelapluie@inuits.eu

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
@roidelapluie
Copy link
Member Author

I also need to add a check that a user does not pass the client_secret and the client_secret_file

return nil, fmt.Errorf("unable to read oauth2 client secret file %s: %s", rt.config.ClientSecretFile, err)
}
secret = string(data)
changed = secret != rt.secret
Copy link
Member Author

Choose a reason for hiding this comment

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

todo: add rlock here

@roidelapluie
Copy link
Member Author

Todo: strip extra blank chars

@LeviHarrison
Copy link
Contributor

Everything so far looks good!

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
@roidelapluie roidelapluie marked this pull request as ready for review April 26, 2021 20:44
Copy link
Contributor

@LeviHarrison LeviHarrison left a comment

Choose a reason for hiding this comment

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

One thing that GitHub won't let me add a comment to. Do we need to add OAuth2 here now that it can read from file?

https://github.com/roidelapluie/common/blob/9361f0ddb7fc9336498d0569e635add8153cf786/config/http_config.go#L148-L156

@roidelapluie
Copy link
Member Author

Yes thanks!!!

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
Copy link
Contributor

@LeviHarrison LeviHarrison left a comment

Choose a reason for hiding this comment

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

Looks great!

Julien Pivotto added 2 commits April 27, 2021 01:00
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants