apache / airavata-custos

Apache Airavata Custos Security
https://airavata.apache.org/custos
Apache License 2.0
13 stars 27 forks source link

User GET call doesn't work in both stage and development stacks #311

Closed samithaliyanage closed 1 year ago

samithaliyanage commented 2 years ago

Getting users from the username API call doesn't work in the stage and development stacks. This works in the production stack.

Request: curl -k -X GET -H "Authorization: Bearer $TKN" -H "Content-Type: application/json; charset=UTF-8" $UM_SERVER/user?user.username=$1

Errors for different authorization tokens

For the BEARER_TOKEN=$(echo -n $ADMIN_ID:$ADMIN_SECRET | base64 -w 0) { "code": 3, "message": "Error while validating method getUser, class org.apache.custos.iam.service.UserSearchRequest cannot be cast to class org.apache.custos.identity.service.AuthToken (org.apache.custos.iam.service.UserSearchRequest and org.apache.custos.identity.service.AuthToken are in unnamed module of loader 'app')", "details": [] }

For the admin access token { "code": 16, "message": "Error while authorizing method getUser, invalid token invalid token INTERNAL: Operation failed Error occurred while decoding token ", "details": [] }

isururanawaka commented 2 years ago

https://github.com/apache/airavata-custos/pull/319

isururanawaka commented 1 year ago

completed