-
Notifications
You must be signed in to change notification settings - Fork 364
Add http headers for supporting keystone tokenless #1002
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
Conversation
|
I have renamed the branch name from ningyougang:feature/support-keystone-tokenless to ningyougang:master. |
ff6506c to
ae97e4c
Compare
|
@auhlig , i have added test case for this pr, can you review and merge it? |
| respondWith(JSON_USERS); | ||
|
|
||
| Map header = new HashMap(); | ||
| String key = "X-Domain-Id"; |
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.
Can the key be same as the example which is "X-Project-Domain-Id"?
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.
- domainScope:
X-Domain-Id:If specified, its the domain scope. - projectScope:
X-Project-Id: If specified, its the project scope.
X-Project-Domain-Id:If specified, its the domain of project scope.
here, i test it X-Domain-Id for domainScope.
please refer to:https://docs.openstack.org/developer/keystone/configure_tokenless_x509.html
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.
makes sense; thanks for clarifying
|
Apart from the minor comment rest LGTM |
|
Sorry for the delay. (2) Maybe the tokenless authentication could also be invoked like The If it's too much work maybe we could do (1) for now @ningyougang? What do you think @ningyougang, @vinodborole, @junoyoon? |
|
@auhlig @junoyoon @vinodborole
Actully, openstack4j already support passing pkcs12 format file.
|
|
@auhlig @junoyoon @vinodborole
|
750344a to
dbcec1d
Compare
|
@auhlig @junoyoon @vinodborole for Can somebody review again, and merged this pr? |
auhlig
left a comment
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.
Sorry for the delay and many thanks for your work @ningyougang. Just one thing in the readme. Could you fix. Would merge after that.
README.md
Outdated
| OSClient.OSClientV3 osClient = OSFactory.builderV3() | ||
| .endpoint("https://<fqdn>:5000/v3") | ||
| .withConfig(config) | ||
| .scopeToProject(Identifier.byId("project id"), Identifier.byId("domain id")) |
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.
project id is unique across all domains. No need for domain id
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.
hi, @auhlig , for projectScope, i have tested in my local in curl mode, it must provide project domain id or project domain name.
curl -v -k -s -X GET --cert /cert.pem \
--key /key.pem \
-H "X-Project-Name: admin" \
https://myhost:5000/v3/roles
error as followings:
{"error": {"message": "Neither Project Domain ID nor Project Domain Name was provided.", "code": 400, "title": "Bad Request"}}
if i added the -H "X-Project-Domain-Id: default". it is ok.
Please refer to the check method: https://docs.openstack.org/developer/keystone/configure_tokenless_x509.html
|
You're using the |
Currently, keystone supports client certificate without having to issue a token, so it is necessary to add http headers to support this feature.
|
@auhlig ,got it, if use |
|
Cool 💯 . Thanks for your contribution @ningyougang |
Currently, keystone supports client certificate without having to issue a
token, so it is necessary to add http headers to support this feature.