JanssenProject / jans

An open source enterprise digital identity platform for CIAM or workforce... Janssen is a distribution of standards-based, developer friendly, components that are engineered to work together in any cloud. #OAuth #OpenID #FIDO
https://docs.jans.io
Apache License 2.0
479 stars 75 forks source link

fix:(scim-cli) unable to global search #2383

Closed manojs1978 closed 2 years ago

manojs1978 commented 2 years ago

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

To Reproduce Steps to reproduce the behavior:

  1. run /opt/jans/jans-cli/scim-cli.py
  2. 5 for global search
  3. 1 for one or more resource search
  4. add schema for group or user (urn:ietf:params:scim:schemas:core:2.0:User or urn:ietf:params:scim:schemas:core:2.0:Group )
  5. press enter till result
  6. See error

Expected behavior should able to globally search for resource

Screenshots image image

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

  1. See error

Expected behavior should able to globally search for resource

Screenshots image image

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

devrimyatar commented 2 years ago

This is not an issue, as @jgomer2001 pointed, schema can be urn:ietf:params:scim:api:messages:2.0:SearchRequest

Example:

global search
-------------
1 Search (from system root) for one or more resource (see section 3.4.3 of RFC 7644)

b: back, q: quit, x: logout and quit

Selection: 1                                                                                                                                                   

«Type: array of string separated by _,»
schemas: urn:ietf:params:scim:api:messages:2.0:SearchRequest                                                                                                   

«A list of attribute names to return in the response. Type: array of string separated by _,»
attributes:                                                                                                                                                    

«When specified, the response will contain a default set of attributes minus those listed here. Type: array of string separated by _,»
excludedAttributes:                                                                                                                                            

«An expression specifying the search criteria. See section 3.4.2.2 of RFC 7644. Type: string»
Example: userName eq "jhon" and meta.lastModified gt "2011-05-13T04:42:34Z"
filter:                                                                                                                                                        

«The attribute whose value will be used to order the returned responses. Type: string»
sortBy:                                                                                                                                                        

«Order in which the sortBy param is applied. Allowed values are "ascending" and "descending". Type: string»
sortOrder:                                                                                                                                                     

«The 1-based index of the first query result. Type: integer»
startIndex: 1                                                                                                                                                  

«Specifies the desired maximum number of query results per page. Type: integer»
count: 10                                                                                                                                                      

Populate optional fields? n                                                                                                                                    
Obtained Data:

{
  "schemas": [
    "urn:ietf:params:scim:api:messages:2.0:SearchRequest"
  ],
  "attributes": [],
  "excludedAttributes": [],
  "filter": null,
  "sortBy": null,
  "sortOrder": null,
  "startIndex": 1,
  "count": 10
}
b: back, n: no, y: yes, q: quit, x: logout and quit

Continue? y                                                                                                                                                    
Please wait while posting data ...

{
  "Resources": [
    {
      "schemas": [
        "urn:ietf:params:scim:schemas:core:2.0:User"
      ],
      "id": "b28a8407-8a63-4e23-9b82-2d65f54d0c24"
    },
    {
      "schemas": [
        "urn:ietf:params:scim:schemas:core:2.0:User"
      ],
      "id": "4bb09918-7cd2-4440-a4e8-ef1449341d20"
    },
    {
      "schemas": [
        "urn:ietf:params:scim:schemas:core:2.0:Group"
      ],
      "id": "60B7"
    }
  ],
  "schemas": [
    "urn:ietf:params:scim:api:messages:2.0:ListResponse"
  ],
  "totalResults": 3,
  "startIndex": 1,
  "itemsPerPage": 3
}
b: back, q: quit, x: logout and quit