Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

artipie users credentials using .yaml doesn't work #1442

Closed
Tzahif opened this issue Apr 10, 2024 · 6 comments
Closed

artipie users credentials using .yaml doesn't work #1442

Tzahif opened this issue Apr 10, 2024 · 6 comments

Comments

@Tzahif
Copy link

Tzahif commented Apr 10, 2024

Hi,

i am trying to use artipie type credentials but it doesn't work - only the env type is working.
i tried to do a docker login and other things and got always 401 status code.

artipie.yml - option 1

meta:
  storage:
    type: fs
    path: /var/artipie/repo
  credentials:
    - type: artipie
  policy:
    type: artipie
    storage:
      type: fs
      path: /var/artipie/security

artipie.yml - option 2

meta:
  storage:
    type: fs
    path: /var/artipie/repo
  credentials:
    - type: artipie
      storage:
        type: fs
        path: /var/artipie/security

/var/artipie/security/users/admin.yaml

type: plain
pass: my-password
roles:
  - api-admin
  - reader
  - writer

i also tried path: /var/artipie/security/users

i would appreciate help with understanding if i am doing something wrong.
also suggestion - maybe on startup adding prints of the users enabled by files credentials

@dgarus
Copy link
Contributor

dgarus commented Apr 26, 2024

What do you try to do?

@Tzahif
Copy link
Author

Tzahif commented Apr 26, 2024

Docker login, push, pull
Apt install
Rpm install

All these actions with the users credentials in the yaml files

@dgarus
Copy link
Contributor

dgarus commented Apr 26, 2024

@Tzahif
Copy link
Author

Tzahif commented Apr 26, 2024

Can you give usage example with the yaml files I mentioned above, using command line, so I will understand what I did wrong?

@dgarus
Copy link
Contributor

dgarus commented Apr 27, 2024

type: plain
pass: 123
permissions:
  adapter_basic_permissions:
    my-maven:
      - "*"
    my-npm:
      - "*"
    my-gem:
      - "*"
    my-gem-port:
      - "*"
  docker_repository_permissions:
    "*":
      "*":
        - *
  docker_registry_permissions:
    "*":
      - base

@Tzahif
Copy link
Author

Tzahif commented Apr 30, 2024

@dgarus this is my configs, am i doing something wrong?

/var/artipie/security/users/admin.yaml

pass: my-password
roles:
  - api-admin
  - reader
  - writer

/var/artipie/security/roles/api-admin.yaml

permissions:
  api_storage_alias_permissions:
    - *
  api_repository_permissions:
    - *
  api_role_permissions:
    - *
  api_user_permissions:
    - *

/var/artipie/security/roles/writer.yaml

permissions:
  adapter_basic_permissions:
    "*":
      - write
  docker_repository_permissions:
    "*":
      "*":
        - push

/var/artipie/security/roles/reader.yaml

permissions:
  adapter_basic_permissions:
    "*":
      - read
  docker_repository_permissions:
    "*":
      "*":
        - pull

@Tzahif Tzahif closed this as completed May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants