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

unable to udated UMA resource #1753

Closed
manojs1978 opened this issue Jul 11, 2022 · 5 comments · Fixed by #2429
Closed

unable to udated UMA resource #1753

manojs1978 opened this issue Jul 11, 2022 · 5 comments · Fixed by #2429
Assignees
Milestone

Comments

@manojs1978
Copy link
Contributor

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:
install jans
open jans-cli
select 8 for OAuth
select 2 for UMA
select 6 to update UMA resource

Expected behavior
shoulde able udated UMA resource

Screenshots
image

Desktop (please complete the following information):

  • OS: ubuntu
  • Browser [e.g. chrome, safari]
  • Version 20.04

Smartphone (please complete the following information):

Additional context

@devrimyatar
Copy link
Contributor

@pujavs see error log

12-07 18:30:57.777 INFO  jans.configapi.filters.LoggingFilter LoggingFilter.java:33- ****Request PATCH /uma/resources/b2b33dde-6dc7-49e3-b600-15c7001392a1 from IP 10.146.197.201
2022-07-12 18:30:57.785:WARN :oejs.HttpChannel:qtp1793436274-17: handleException /jans-config-api/api/v1/uma/resources/b2b33dde-6dc7-49e3-b600-15c7001392a1 com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot construct instance of `java.util.ArrayList` (although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value ('["1201.c510dedb-2496-468c-b053-340d6131d07d"]')| at [Source: UNKNOWN; byte offset: #UNKNOWN] (through reference chain: io.jans.as.model.uma.persistence.UmaResource["clients"])

@moabu moabu added this to the 1.0.2 milestone Jul 14, 2022
@pujavs
Copy link
Contributor

pujavs commented Jul 15, 2022

@devrimyatar, i tested this and the endpoint is working fine when invoking via rest http request.

Seems a generic problem with jans-cli where in ArrayList attribute patch is not working. I tested both UMA Resource with clients property and UMA Scope with umaAuthorizationPolicies property. Both these properties are ArrayList and not working via jans-cli PATCH.
I tried all permutations to pass ArrayList but it's failing. Request you to please check and revert.

1. UMA Resource PATCH Testing
1.1. Http request - Working
image

1.2. jans-cli - Error
image
image
image
image

2. Scope PATCH Testing
2.1. Http request - Working
image

2.2. jans-cli - Error
image

@pujavs pujavs assigned devrimyatar and unassigned pujavs Jul 18, 2022
@pujavs
Copy link
Contributor

pujavs commented Jul 18, 2022

Assigning it to @devrimyatar for handling ArrayList in PATCH request

@devrimyatar
Copy link
Contributor

Fixed in commit 71067cd

image

@devrimyatar
Copy link
Contributor

List values should be seperated by _, as usual

yuriyz pushed a commit that referenced this issue Sep 28, 2022
* fix: jans-cli client clientName

* fix: jans-cli config-api pagination

* fix: jans-cli seperation char (ref: #1350)

* fix: jans-cli identify if patch property is array

* fix: jans-cli sort optional fields (ref: #1349)

* fix: jans-cli add log_dir to ini file and arg (ref: #1655)

* fix: jans-cli _b for escaping prompt (ref: #1657)

* feat: jans-cli tabulate UMA Resources

* fix: jans-cli array values for patch (ref: #1753)

* fix: jans-cli display last item in tabulated data

* fix: jans-cli item numbers in tabulated data

* fix: jans-cli hide user operations for openbanking (ref: #1878)

* fix: jans-cli hide fido2 for openbanking (ref: #1911)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants