Sonatype Nexus · Capability

Sonatype Nexus Repository Manager — Security management: user tokens

Sonatype Nexus Repository Manager — Security management: user tokens. 4 operations. Lead operation: Show if the user token capability is enabled or not. Self-contained Naftiko capability covering one Sonatype Nexus business surface.

Run with Naftiko Sonatype NexusSecurity management: user tokens

What You Can Do

DELETE
Resetallusertokens — resetallusertokens
/v1/v1/security/user-tokens
GET
Servicestatus — Show if the user token capability is enabled or not
/v1/v1/security/user-tokens
PUT
Setservicestatus — setservicestatus
/v1/v1/security/user-tokens
GET
List — List all user tokens
/v1/v1/security/user-tokens/tokens

MCP Tools

resetallusertokens

resetallusertokens

idempotent
show-if-user-token-capability

Show if the user token capability is enabled or not

read-only idempotent
setservicestatus

setservicestatus

idempotent
list-all-user-tokens

List all user tokens

read-only idempotent

Capability Spec

repository-security-management-user-tokens.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: 'Sonatype Nexus Repository Manager — Security management: user tokens'
  description: 'Sonatype Nexus Repository Manager — Security management: user tokens. 4 operations. Lead operation: Show if
    the user token capability is enabled or not. Self-contained Naftiko capability covering one Sonatype Nexus business surface.'
  tags:
  - Sonatype Nexus
  - 'Security management: user tokens'
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    SONATYPE_NEXUS_API_KEY: SONATYPE_NEXUS_API_KEY
capability:
  consumes:
  - type: http
    namespace: repository-security-management-user-tokens
    baseUri: ''
    description: 'Sonatype Nexus Repository Manager — Security management: user tokens business capability. Self-contained,
      no shared references.'
    resources:
    - name: v1-security-user-tokens
      path: /v1/security/user-tokens
      operations:
      - name: resetallusertokens
        method: DELETE
        description: ''
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: servicestatus
        method: GET
        description: Show if the user token capability is enabled or not
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: setservicestatus
        method: PUT
        description: ''
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: v1-security-user-tokens-tokens
      path: /v1/security/user-tokens/tokens
      operations:
      - name: list
        method: GET
        description: List all user tokens
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: realm
          in: query
          type: string
          description: The realm of the user (optional for cloud, required for self-hosted)
        - name: userId
          in: query
          type: string
          description: Filter by user ID (optional)
        - name: includeExpired
          in: query
          type: boolean
          description: 'Include expired tokens (default: false)'
        - name: skip
          in: query
          type: integer
          description: 'Number of items to skip for pagination (default: 0)'
        - name: limit
          in: query
          type: integer
          description: 'Maximum number of items to return (default: 25, max: 100)'
    authentication:
      type: basic
      username: '{{env.SONATYPE_NEXUS_USER}}'
      password: '{{env.SONATYPE_NEXUS_PASS}}'
  exposes:
  - type: rest
    namespace: repository-security-management-user-tokens-rest
    port: 8080
    description: 'REST adapter for Sonatype Nexus Repository Manager — Security management: user tokens. One Spectral-compliant
      resource per consumed operation, prefixed with /v1.'
    resources:
    - path: /v1/v1/security/user-tokens
      name: v1-security-user-tokens
      description: REST surface for v1-security-user-tokens.
      operations:
      - method: DELETE
        name: resetallusertokens
        description: resetallusertokens
        call: repository-security-management-user-tokens.resetallusertokens
        outputParameters:
        - type: object
          mapping: $.
      - method: GET
        name: servicestatus
        description: Show if the user token capability is enabled or not
        call: repository-security-management-user-tokens.servicestatus
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: setservicestatus
        description: setservicestatus
        call: repository-security-management-user-tokens.setservicestatus
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/security/user-tokens/tokens
      name: v1-security-user-tokens-tokens
      description: REST surface for v1-security-user-tokens-tokens.
      operations:
      - method: GET
        name: list
        description: List all user tokens
        call: repository-security-management-user-tokens.list
        with:
          realm: rest.realm
          userId: rest.userId
          includeExpired: rest.includeExpired
          skip: rest.skip
          limit: rest.limit
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: repository-security-management-user-tokens-mcp
    port: 9090
    transport: http
    description: 'MCP adapter for Sonatype Nexus Repository Manager — Security management: user tokens. One tool per consumed
      operation, routed inline through this capability''s consumes block.'
    tools:
    - name: resetallusertokens
      description: resetallusertokens
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: repository-security-management-user-tokens.resetallusertokens
      outputParameters:
      - type: object
        mapping: $.
    - name: show-if-user-token-capability
      description: Show if the user token capability is enabled or not
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: repository-security-management-user-tokens.servicestatus
      outputParameters:
      - type: object
        mapping: $.
    - name: setservicestatus
      description: setservicestatus
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: repository-security-management-user-tokens.setservicestatus
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: list-all-user-tokens
      description: List all user tokens
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: repository-security-management-user-tokens.list
      with:
        realm: tools.realm
        userId: tools.userId
        includeExpired: tools.includeExpired
        skip: tools.skip
        limit: tools.limit
      outputParameters:
      - type: object
        mapping: $.