-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Enable ESP to invoke Firebase Security rules. #54
Merged
Merged
Changes from 11 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
348f061
Enable ESP to invoke Firebase Security rules.
sarvaniv 6339697
Address code review comments.
sarvaniv 13caf68
Address code review comments
sarvaniv b0e48c7
Remove some debug logs
sarvaniv 6f10a20
Add proto file to capture TestRulesetRequest.
sarvaniv c6ae0fa
clang-format files
sarvaniv 01b50bf
Resolve a merge issue with previous commit
sarvaniv 1a6704c
Allow security rules to disabled via serverconfig
sarvaniv 6351cfa
format file
sarvaniv 32d0023
Addressed Wayne's review comments.
sarvaniv 75d6e7a
Add firebase server to Server Config.
sarvaniv b573770
Address Lizan's review comments
sarvaniv 9887846
Address review comments.
sarvaniv 7a2abe7
Disable check rules service by default.
sarvaniv b871e40
Address more review comments.
sarvaniv 71c0d92
Fix a check.
sarvaniv 50955e3
Delete unwanted constant.
sarvaniv 35a61df
Address Wayne's comments and add a simple config test.
sarvaniv 4ef505a
Address a review comment.
sarvaniv 9dddcac
Add negative test case for config
sarvaniv c35348d
Address code review
sarvaniv 4ccc606
Remove unwanted const std::string
sarvaniv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -699,12 +699,16 @@ grpc_jwt_verifier_status JwtValidatorImpl::FillUserInfoAndSetExp( | |
|
||
// Optional field. | ||
const grpc_json *grpc_json = grpc_jwt_claims_json(claims_); | ||
|
||
char *json_str = | ||
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.
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. Thank you. Missed this while addressing review comments. I was freeing this in the first commit :-) |
||
grpc_json_dump_to_string(const_cast<::grpc_json *>(grpc_json), 0); | ||
user_info->claims = json_str == nullptr ? "" : json_str; | ||
|
||
const char *email = GetStringValue(grpc_json, "email"); | ||
user_info->email = email == nullptr ? "" : email; | ||
const char *authorized_party = GetStringValue(grpc_json, "azp"); | ||
user_info->authorized_party = | ||
authorized_party == nullptr ? "" : authorized_party; | ||
|
||
exp_ = system_clock::from_time_t(grpc_jwt_claims_expires_at(claims_).tv_sec); | ||
|
||
return GRPC_JWT_VERIFIER_OK; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Why do you include ?
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.
removed.