Skip to content

The strongbox-security-users.yaml File

TODO @sbespalov

Example strongbox-security-users.yaml File

The configuration file consists of a set of user configurations and has the following structure:

users:
  user:
    - username: admin
      password: $2a$10$WqtVx7Iio0cndyR1lEaKW.SWhUYmF/zHHG5hkAXvH5hUmklM7QfMO
      roles:
        - ADMIN
      securityTokenKey: admin-secret
    - username: maven
      password: $2a$10$WqtVx7Iio0cndyR1lEaKW.SWhUYmF/zHHG5hkAXvH5hUmklM7QfMO
      roles:
        - ADMIN
      securityTokenKey: maven-secret
    - username: user
      password: $2a$10$WqtVx7Iio0cndyR1lEaKW.SWhUYmF/zHHG5hkAXvH5hUmklM7QfMO
      roles:
        - ADMIN
      securityTokenKey: user-secret
    - username: deployer
      password: $2a$10$WqtVx7Iio0cndyR1lEaKW.SWhUYmF/zHHG5hkAXvH5hUmklM7QfMO
      roles:
        - UI_MANAGER
      securityTokenKey: deployer-secret
      accessModel:
        storages:
          - id: storage0
            repositories:
              - id: releases
                repositoryPrivileges:
                  - name: ARTIFACTS_DEPLOY
                  - name: ARTIFACTS_RESOLVE
    - username: developer01
      password: $2a$10$WqtVx7Iio0cndyR1lEaKW.SWhUYmF/zHHG5hkAXvH5hUmklM7QfMO
      roles:
        - UI_MANAGER
      securityTokenKey: developer01-secret
      accessModel:
        storages:
          - id: storage0
            repositories:
              - id: releases
                repositoryPrivileges:
                  - name: ARTIFACTS_RESOLVE
                pathPrivileges:
                  - path: com/carlspring
                    wildcard: true
                    privileges:
                      - name: ARTIFACTS_VIEW
                  - path: org/carlspring
                    wildcard: true
                    privileges:
                      - name: ARTIFACTS_DELETE
                  - path: com/mycorp
                    privileges:
                      - name: ARTIFACTS_VIEW
                      - name: ARTIFACTS_DEPLOY
                      - name: ARTIFACTS_DELETE
                      - name: ARTIFACTS_COPY

The access-model element is optional.

Configuring The User Access Model

TODO @sbespalov

Information for Developers

The following classes are related to various aspects of the users configuration:

Class Name Description
org.carlspring.strongbox.users.dto.UsersDto Represents users configuration in a deserialized form.
org.carlspring.strongbox.users.UsersFileManager Class to serialize / deserialize the users configuration.

The strongbox-security-users.yaml, which is packaged in the distribution, is located under the strongbox-storage-api-resources's src/main/resources/etc/conf directory.


Last update: 2020-12-07