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
feat(polling-registry) Add BASIC & OAuth2 client auth support for HTTP/HTTPS file loading. #531
Merged
msavy
merged 8 commits into
apiman:master
from
msavy:vertx-polling-client-auth-refactor-rb
Feb 7, 2017
Merged
feat(polling-registry) Add BASIC & OAuth2 client auth support for HTTP/HTTPS file loading. #531
msavy
merged 8 commits into
apiman:master
from
msavy:vertx-polling-client-auth-refactor-rb
Feb 7, 2017
Conversation
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
Example of using HTTP with BASIC auth: "registry": {
"class": "io.apiman.gateway.engine.vertx.polling.URILoadingRegistry",
"config": {
"configUri": "https://gist.githubusercontent.com/msavy/cb245f4ed5228e8aa368a03b035f4b9b/raw/25dcc614dba43821b7623e16302b404c39bdeeca/apiman-gateway-api.json",
"auth": "basic",
"username": "foo",
"password": "bar"
}
}, Might change the layout a bit, but you get the gist. Example with OAuth2: "registry": {
"class": "io.apiman.gateway.engine.vertx.polling.URILoadingRegistry",
"config": {
"configUri": "https://gist.githubusercontent.com/msavy/cb245f4ed5228e8aa368a03b035f4b9b/raw/25dcc614dba43821b7623e16302b404c39bdeeca/apiman-gateway-api.json",
"auth": "OAuth2Client",
"flowType": "password",
"oauthUri": "http://localhost:8080/auth",
"tokenPath": "/realms/apiman/protocol/openid-connect/token",
"clientID": "apiman",
"clientSecret": "5af5458f-0a96-4251-8f92-08ebcc3a8aa2",
"username": "admin",
"password": "admin123!"
}
}, |
msavy
force-pushed
the
vertx-polling-client-auth-refactor-rb
branch
from
February 4, 2017 22:34
a8ff82e
to
2ea2488
Compare
Also added: Keycloak-specific support via pmlopes's super-awesome Vert.x OAuth2 Client. Just paste the Keycloak OIDC JSON from the "installation" section in your KC client. "registry": {
"class": "io.apiman.gateway.engine.vertx.polling.URILoadingRegistry",
"config": {
"configUri": "https://gist.githubusercontent.com/msavy/cb245f4ed5228e8aa368a03b035f4b9b/raw/25dcc614dba43821b7623e16302b404c39bdeeca/apiman-gateway-api.json",
"realm": "apiman",
"realm-public-key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxyG61ohrfJQKNmDA/ePZtqZVpPXjwn3k3T+iWiTvMsxW2+WlnqIEmL5qZ09DMhBH9r50WZRO2gVoCb657Er9x0vfD6GNf/47XU2y33TX8axhP+hSwkv/VViaDlu4jQrfgPWz/FXMjWIZxg1xQS+nOBF2ScCRYWNQ/ZnUNnvrq8dGC2/AlyeYcgDUOdwlJuvgkGlF0QoVPQiRPurR3RwlG+BjL8JB3hbaAZhdJqwqApmGQbcpgLj2tODnlrZnEAp5cPPU/lgqCE1OOp78BAEiE91ZLPl/+D8qDHk+Maz0Io3bkeRZMXPpvtbL3qN+3GlF8Yz264HDSsTNrH+nd19tFQIDAQAB",
"auth-server-url": "http://localhost:8080/auth",
"ssl-required": "none",
"resource": "apiman",
"credentials": {
"secret": "5af5458f-0a96-4251-8f92-08ebcc3a8aa2"
},
"username": "admin",
"password": "admin123!",
"auth": "KeycloakOAuth2Client",
"flowType": "password"
}
} |
…P/HTTPS file loading. * Refactor for improved extensibility, with assumption additional auth methods will be added later.
* refactor Make some OAuth2 code shared. * refactor Use new initialisation code. * refactor Better error handling.
msavy
force-pushed
the
vertx-polling-client-auth-refactor-rb
branch
from
February 7, 2017 14:44
5b7ea07
to
777c6f4
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add BASIC & OAuth2 client auth support for HTTP/HTTPS file loading.
Refactor for improved extensibility, with assumption additional auth methods will be added later.