cloudfoundry / cloudfoundry/uaa-cli
UAA _can_ return client resource_ids as string
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 22
- Forks
- 14
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 11
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing uaa get-client identity and trace the Go response decoding for the UAA client resource_ids field. Compare handling of the documented array with the reported scalar value "none"; done means this response no longer produces an unmarshal error while array-valued clients continue to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100