One Identity Manager 10.0 API generic POST method returns 57002001 permission error

Hi, 

I am currently testing default One Identity Manager 10.0 API endpoint. 

 

Authentication: 

Endpoint: 

/imx/login/portal/RoleBasedPerson  - IDentity (RoleBased)

/imx/login/dialog/DialogUser  - viadmin

 

Authentication works successfully. 

Session cookies and XSRF handling are working correctly. 

 

Some of working endpoints: 

GET /portal/person/all 

GET /portal/candidates/Person 

GET /portal/targetsystem/ldapaccount 

GET /portal/targetsystem/ldapcontainer 

GET /portal/targetsystem/ldapaccount/datamodel 

GET /portal/targetsystem/ldapgroup/datamodel 

 

Issue: 

Generic POST operations fail with: 

[ 
  { 
    "Message": "You do not have permission to call this method.", 
    "Number": 57002001 
  } 
] 
 

 

 

Additional observations: 

/portal/targetsystem/ldapgroup fails with: 

810024 - LDAP groups: Viewing permission denied for value "Dynamic group" 

Stack trace references: 

XReadOnlyMemberships 

IsDynamicGroup 

TSB.CompositionApi.Group.ReadOnlyMembershipProperty 

 

Questions: 

Are /portal/generic/* POST/PUT methods intentionally blocked for RoleBasedPerson authentication? 

  • Is a service/system authentication model required instead of portal user authentication? 
  • Which permission groups or API method assignments are required for generic CRUD operations? 
  • Is there recommended guidance for enabling CRUD operations on default Composition API entity methods? 
Parents
  • Generic write operations are **not** blocked for RoleBasedPerson or any other authentication module. Error `57002001` ("You do not have permission to call this method") comes from **API endpoint permissions**. The API Server evaluates these before it looks at any data.


    This is expected behavior. The fix is configuration, not code.


    How endpoint permissions work:


    Each API Server endpoint has an identifier made from the HTTP verb and the route, for example:


    POST portal/generic/{type}
    PUT portal/generic/{type}

    For every call, the API Server checks whether that endpoint has any permission groups assigned. These assignments are stored in `DialogGroupHasAEDS`.

    - No groups assigned: the call is allowed.

    - One or more groups assigned: the authenticated user must be in at least one of those groups. If not, the call fails with `57002001` (HTTP 403).

    The authentication module doesn't matter. Only the permission groups of the logged-in session count. Note that `viadmin` is not automatically a member of every permission group, so it can fail this check too.


    This explains the behaviour you saw. The GET endpoints either have no restriction or are assigned to groups your users are in. The generic write endpoints are assigned to groups your users are not in.

    Permissions needed for generic CRUD:


    A write through `/portal/generic/{type}` has to pass three checks, in this order:

    # Check Configured in Result if it fails
    1 Endpoint permission DialogGroupHasAEDS (API endpoint to permission group) 57002001 / HTTP 403
    2 Table enabled for the API DialogTable.IsApiServerEnabled HTTP 400: "This operation is not allowed for this table."
    3 Object and column permissions Permission group table and column rights (insert, edit, delete, view) 810xxx permission errors

    IsApiServerEnabled is a bit flag. Add the values for the operations you need:

    Value Operation
    1 Read
    2 Update
    4 Delete
    8 Create

    For example, `15` enables all four operations.

    Configuration steps

    1. Find which groups are assigned to the generic endpoints

    SELECT a.FileName AS Endpoint,
    g.GroupName AS PermissionGroup
    FROM DialogGroupHasAEDS x
    JOIN DialogAEDS a ON a.UID_DialogAEDS = x.UID_DialogAEDS
    JOIN DialogGroup g ON g.UID_DialogGroup = x.UID_DialogGroup
    WHERE a.FileName LIKE '%portal/generic%'
    ORDER BY a.FileName

    2. Grant endpoint access. In the Designer, do one of the following:

    - Assign the relevant endpoints (for example `POST portal/generic/{type}`) to a permission group your users are in.

    - Make your users members of a group that's already assigned.

    For role-based users, use a permission group that's resolved through their application roles.


    The API Server checks these assignments for changes about every 4 minutes. If you need the change to apply right away, restart the API Server.


    3. Enable the target tables for the API. Set `IsApiServerEnabled` on each table you want to write to (see the flag values above).

    4. Check object permissions. Make sure the permission group has the table and column rights the operation needs, such as insert, edit, or delete on the table and edit on the columns being written.


    Verifying:


    Set the API Server log level to Debug and repeat the call. When endpoint permissions apply, the log contains a line like this:

    Check group permission for POST portal/generic/{type} -> <GroupA>,<GroupB>: False

    The group names in that line tell you exactly which groups need to be granted.

    Note: The API Server has a setting called *Endpoint security permission checks* (on by default). Please don't turn it off to work around this. It disables endpoint permissions for every endpoint on the server.

    Recommendation for integrations:


    `/portal/generic` is designed mainly to support the Web Portal. For system-to-system CRUD, we recommend one of these instead of a portal user session:

    - A custom API project built with the API Designer. This lets you control exactly which endpoints and tables are exposed, and you can assign a dedicated permission group.

    - The Application Server REST API, using a dedicated system user whose permissions are limited to what the integration needs.

    Both give you a clearer permission boundary and are easier to audit than widening portal permissions.


    LDAP group error 810024:


    This is a separate issue from `57002001`.


    The `/portal/targetsystem/ldapgroup` endpoint returns a calculated property (`XReadOnlyMemberships`) that reads the `IsDynamicGroup` column of the LDAP group. The authenticated user doesn't have view permission on that column, so the request fails with:

    810024 - LDAP groups: Viewing permission denied for value "Dynamic group"

    Workaround: Give the user's permission group view rights on `LDAPGroup.IsDynamicGroup`.

  • Love this detailed response... could you write One Identity's documentation for them? Stuck out tongue winking eye

Reply Children
No Data