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

UAA _can_ return client resource_ids as string #63

Open
sneal opened this issue May 12, 2020 · 2 comments
Open

UAA _can_ return client resource_ids as string #63

sneal opened this issue May 12, 2020 · 2 comments

Comments

@sneal
Copy link

sneal commented May 12, 2020

Executing uaa get-client identity against a Tanzu Application Service installation results in the following error:

json: cannot unmarshal string into Go struct field Client.resource_ids of type []string

The raw UAA response object contains a single string instead of an array of resource_ids. Here's the raw response:

{
    "scope": [
        "cloud_controller.admin",
        "cloud_controller.read",
        "cloud_controller.write",
        "openid",
        "zones.*.*",
        "zones.*.*.*",
        "zones.read",
        "zones.write",
        "scim.read"
    ],
    "client_id": "identity",
    "resource_ids": "none",
    "authorized_grant_types": [
        "authorization_code",
        "client_credentials",
        "refresh_token"
    ],
    "redirect_uri": [
        "https://p-identity.sys.example.com/dashboard/",
        "https://p-identity.sys.example.com/dashboard/**"
    ],
    "autoapprove": true,
    "authorities": [
        "zones.read",
        "zones.write",
        "scim.zones",
        "uaa.resource",
        "uaa.admin",
        "cloud_controller.admin"
    ],
    "lastModified": 1588509584000
}

This is the only client that seems to have this issue. The UAA API clearly documents that client resource_ids should be an array.

@cf-gitbot
Copy link

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

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

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

@shamus
Copy link

shamus commented May 21, 2020

Hi there. I agree, the cli should be able to handle all API responses from the UAA. I've prioritized this issue and the team will take a look at it.

Additionally it looks like you've found an error in our API documentation. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

3 participants