Skip to content
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

UAAC CLI not validating scopes #64

Closed
x64bytes opened this issue Jul 26, 2018 · 6 comments
Closed

UAAC CLI not validating scopes #64

x64bytes opened this issue Jul 26, 2018 · 6 comments

Comments

@x64bytes
Copy link

Recently we went through small typo that delayed some of our troubleshooting efforts. Below is the same code we are trying to create a client(The actual scope and authorities are spelled wrong in the code). Surprisingly, uaac never complained, but the authentication for this client keeps failing. After going through many hops, we have identified that the uaac command line is not checking scopes, we saw that its validating grant types, but not --authorities and --scope. Any specific reason that this syntax not validating? or something I am missing to interpret?.

Command With Typo:-

uaac client add testclient --name testclient --scope cloudcontroller.read --authorities cloudcontroller.admin --authorized_grant_types "authorization_code,refresh_token" --access_token_validity 3600 --refresh_token_validity 3600 --secret XXXXXX --redirect_uri https://concourse.domain.com/auth/uaa/callback --autoapprove true

Actual command:-

uaac client add testclient --name testclient --scope cloud_controller.read --authorities cloud_controller.admin --authorized_grant_types "authorization_code,refresh_token" --access_token_validity 3600 --refresh_token_validity 3600 --secret XXXXXX --redirect_uri https://concourse.domain.com/auth/uaa/callback --autoapprove true

@cf-gitbot
Copy link

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/159348412

The labels on this github issue will be updated when the story is started.

@drnic
Copy link

drnic commented Jul 26, 2018

Perhaps give the new uaa cli a go as to where the core team is putting active development.

https://github.com/cloudfoundry-incubator/uaa-cli

@x64bytes
Copy link
Author

@drnic I just compiled, but it seems I am getting "You must have a token in your context to perform this command". Any idea on how to log in, if I want to use default admin client account?.

@drnic
Copy link

drnic commented Jul 26, 2018

uaa target https://192.168.50.6:8443 --skip-ssl-validation
uaa get-client-credentials-token admin -s <uaa_admin_client_secret>

@x64bytes
Copy link
Author

@drnic Thanks.
I have tested this and have still same issues. It's weird, that new uaa is exhibiting the same behavior. the typo is not validated for scopes, but validated for grant types.

@bruce-ricard
Copy link
Contributor

Scopes can be anything. The resource servers can decide to use scopes x64bytes+salmon or hacker.bruce. It's not possible even for the UAA to validate the scopes, even less for the CLI.

Sorry for the 5 year delay btw.

@bruce-ricard bruce-ricard closed this as not planned Won't fix, can't repro, duplicate, stale Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

4 participants