-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Update the auth check to use service.experimental.authorization.provider #67
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
Changes from 1 commit
2da31e2
598d1b1
1e3a82d
478ae1d
0eee367
93ed1cc
b8ca462
1fd53e0
bdfe1fc
05df900
2e55ff7
519b540
d33154d
0d78984
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -67,7 +67,10 @@ class ServiceContext { | |
|
|
||
| bool IsRulesCheckEnabled() const { | ||
| return RequireAuth() && service().apis_size() > 0 && | ||
| !config_->GetFirebaseServer().empty(); | ||
| (!config_->GetFirebaseServer().empty() || | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i actually agree with Wayne's comment. Both the service and server config are in config.cc. Moving this logic there makes sense.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ack |
||
| (service().has_experimental() && | ||
| service().experimental().has_authorization() && | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you should move this also to GetFirebaseServer. Also, the GetFirebaseServer method should be returning the service config's provide is the server config value is empty. That part is missing. Is this code tested?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's a little strange. The code was updated before this comment, https://screenshot.googleplex.com/uSnOfw2BUfe, not sure why you still saw old version. |
||
| service().experimental().authorization().has_provider())); | ||
| } | ||
|
|
||
| auth::Certs &certs() { return certs_; } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put this logic inside config::GetFirebaseServer() function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the intention is to separate the logic of server config and service config.
liminw@, what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with Wayne that the logic should be in config::GetFirebaseServer(). This function should be a wrapper, and determine whether the server is set from server config or service config.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed offline with limin, the code is updated.