Reputation: 31
We have several groups in Artifactory Cloud which have a 'non-admin access token' assigned to them. This setup did work without an issue for almost one year. But since yesterday we're not able to use any of the group tokens anymore. Created a new group token today, but still doesn't work.
While checking the "Artifactory System logs" in the admin UI, it seems the Artifactory service was restarted yesterday (on which our depending jobs started to fail). The logs contain a lot of "Principal mismatch for token with id '[ID]'" messages.
My conclusion is that authentication of the group tokens still works, but somehow the next step (= principal mismatch ?) is failing. Any idea how to fix this? Thanks in advance!
--Edit--
We are using Python code from this REPO to generate group token (worked without issue last week): https://pypi.org/project/pyartifactory/1.9.1/
token = art.security.create_access_token(user_name=group_name,
groups=[group.name],
refreshable=False,
expires_in=0)
Used this curl statement for testing:
curl -O "https://$CRED@[subscription_name].jfrog.io/artifactory/[location to Python wheel]"
If $CRED is [Username]:[Password] it works fine, but [Group]:[API token] is not working (which used to work before last Sunday; issue is with both new and existing groups/tokens).
Upvotes: 3
Views: 3740
Reputation: 369
You can't use group name as username in basic auth. Try bearer auth:
curl -O "https://[subscription_name].jfrog.io/artifactory/[location to Python wheel]" -H "Authoriazation: Bearer [API token]"
Checkout basic/bearer SO thread
Upvotes: 0