Skip to main content

Security Management API

See the API documentation found in the Settings menu under System of Nexus Repository.

Content Selectors

The content selectors REST API endpoints can be used to create and manage content selectors:

  • list the content selectors

  • create or modify content selectors

LDAP

The LDAP endpoints can be used to accomplish the following:

  • List all LDAP servers

  • Create LDAP server

  • Retrieve the details of a single LDAP server

  • Update LDAP server

  • Delete LDAP server

  • Change LDAP server ordering

SAML

When onboarding users to Nexus Repository, Administrators use this API to pre-provision SAML users, assign roles before first login, and reconcile roles with IdP groups upon login.

Available in Nexus Repository Pro and Nexus Repository Cloud

The SAML endpoints can be used to accomplish the following:

  • Lists users with pagination, filtering, and sorting.

    GET /v1/security/saml/users

    Requires nexus:users:read permission

  • Returns the user by identifier.

    GET /v1/security/saml/users/{id}

    Requires nexus:users:read permission

  • Creates a SAML user.

    POST /v1/security/saml/users

    Supports ?upsert=true to replace attributes and preProvisionedRoles if the identifier exists.

    Requires nexus:users:create permission

  • Replaces mutable fields.

    PUT /v1/security/saml/users/{id}

    Requires nexus:users:update permission

  • Deletes the user per current capabilities.

    DELETE /v1/security/saml/users/{id}

    Requires nexus:users:delete permission

Example Json Payload for Users

The following payload is returned by the GET requests. This structure is used when setting new users.

{
  "userId": "jsmith",
  "firstName": "John",
  "lastName": "Smith",
  "emailAddress": "[email protected]",
  "status": "active",
  "roles": [
    "Nexus Developer"
  ]
}

Privileges

The privileges REST API endpoints can be used to create and manage privileges:

  • list the privileges

  • create or modify privileges

Roles

The roles REST API endpoints can be used to create and manage roles and their permissions within Nexus Repository:

  • list the roles from any configured user source (internal or external)

  • create or modify local roles and external role mappings

Users

The users REST API endpoints can be used to create and manage users and their permissions within Nexus Repository:

  • search for users available to NXRM whether they were defined locally or from a configured authentication source such as LDAP

  • create or modify local users

  • change the roles associated with an external user

  • reset an individual user token

  • reset all user tokens in the system

Note

The users REST API can accept the following realm names associated with user tokens: LdapRealm, Crowd, SamlRealm, and NexusAuthenticatingRealm.

User Sources

This endpoint provides a list of the available users sources in Nexus Repository. Other REST endpoints use these to indicate the source of certain types of entities (e.g., a user from an LDAP server).