-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[Issue #6711]: add audience verify in AuthenticationProviderToken #6716
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
Merged
Conversation
This file contains hidden or 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
Member
Author
|
Also @EronWright, Would you please help review it? |
sijie
requested changes
Apr 11, 2020
...ommon/src/main/java/org/apache/pulsar/broker/authentication/AuthenticationProviderToken.java
Outdated
Show resolved
Hide resolved
...ommon/src/main/java/org/apache/pulsar/broker/authentication/AuthenticationProviderToken.java
Show resolved
Hide resolved
...ommon/src/main/java/org/apache/pulsar/broker/authentication/AuthenticationProviderToken.java
Outdated
Show resolved
Hide resolved
sijie
requested changes
Apr 12, 2020
...ommon/src/main/java/org/apache/pulsar/broker/authentication/AuthenticationProviderToken.java
Outdated
Show resolved
Hide resolved
sijie
approved these changes
Apr 13, 2020
Member
|
@jiazhai there are test failures. |
Member
Author
|
Thanks @sijie, rebased with latest master, and fixed the ut error, which caused by exception not match |
jiazhai
pushed a commit
that referenced
this pull request
Jul 10, 2020
Motivation This doc PR is updated for configurations for PRs: #6716 #6853 #6074 1: The broker configuration (for #6716) is updated by Jia Zhai. 2: Add other supported configurations to the client, standlone and proxy configuration docs based on the client.config, standlone.config and proxy.config files. Modifications 1: Add TLS with keystore type config in standlone and proxy configuration file. 2: update reference > pulsar configuration > client for PIP-55: Refresh Authentication Credentials Add other supported configurations to the standlone and proxy configuration files based on the standlone.config and proxy.config files.
huangdx0726
pushed a commit
to huangdx0726/pulsar
that referenced
this pull request
Aug 24, 2020
…en (apache#6716) Fixes apache#6711 ### Motivation User like to be able to configure the JWT authentication provider to verify the audience on incoming tokens. I believe this will improve security because it would prevent a spoofer from reusing a token that was intended for another purpose (yet signed by the same issuer). [RFC 6749 section 4.1.3](https://tools.ietf.org/html/rfc7519#section-4.1.3) has some guidance on this. In my scenario, the token is an OAuth 2.0 token, and OAuth 2.0 makes extensive use of the audience claim ([ref](https://auth0.com/docs/tokens/guides/validate-access-tokens#check-additional-standard-claims)). 1. a configurable audience claim name (e.g. `aud`). 2. if audience isn't configured, do not validate the audience (for back-compatibility). 3. if audience is configured, validate that the value is present in the token. ### Modifications - Add the logic in AuthenticationProviderToken. - Add related tests. ### Verifying this change - Ut passed
huangdx0726
pushed a commit
to huangdx0726/pulsar
that referenced
this pull request
Aug 24, 2020
Motivation This doc PR is updated for configurations for PRs: apache#6716 apache#6853 apache#6074 1: The broker configuration (for apache#6716) is updated by Jia Zhai. 2: Add other supported configurations to the client, standlone and proxy configuration docs based on the client.config, standlone.config and proxy.config files. Modifications 1: Add TLS with keystore type config in standlone and proxy configuration file. 2: update reference > pulsar configuration > client for PIP-55: Refresh Authentication Credentials Add other supported configurations to the standlone and proxy configuration files based on the standlone.config and proxy.config files.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/security
doc
Your PR contains doc changes, no matter whether the changes are in markdown or code files.
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.
Fixes #6711
Motivation
User like to be able to configure the JWT authentication provider to verify the audience on incoming tokens. I believe this will improve security because it would prevent a spoofer from reusing a token that was intended for another purpose (yet signed by the same issuer). RFC 6749 section 4.1.3 has some guidance on this. In my scenario, the token is an OAuth 2.0 token, and OAuth 2.0 makes extensive use of the audience claim (ref).
aud).Modifications
Verifying this change