sonatype / nexus-public

Sonatype Nexus Repository Open-source codebase mirror
https://www.sonatype.com/products/repository-oss-download
Eclipse Public License 1.0
1.9k stars 560 forks source link

NPM Auth Token does not work with Keycloak #160

Open rkesters opened 1 year ago

rkesters commented 1 year ago

Sonatype Nexus Repository OSS users can file an issue here.

Sonatype Nexus Repository Pro customers should not use this form - please go to https://support.sonatype.com to report issues.

Thanks for creating an issue! Please fill out this form so we can be sure to have all the information we need, and to minimize back and forth.

Steps -- user is stored in keycloack

  1. npm login (works, writes token to .npmrc)
  2. npm login (same user fails) Error message:
    npm ERR! code E401
    npm ERR! Unable to authenticate, need: BASIC realm="Sonatype Nexus Repository Manager"
  3. npm install (fails with same error)

Steps -- user is local

  1. npm login (works, writes token to .npmrc)
  2. npm login (works)
  3. npm install (works)

Steps -- user is stored in keycloak, but using basic auth

  1. npm install (fails, same error)

not really, basic auth does not work either.

nblair commented 1 year ago

Hi @rkesters - thank for opening an issue. 3.30.0-01 is a very old version of Nexus Repository, can I ask that you upgrade to a recent version and re-evaluate? If the problem is still present, it's unclear what you mean by "keycloak" as a source for the user. SAML integration is available for Nexus Repository Pro users, I don't believe we have alternative user sources for OSS deployments aside from Atlassian Crowd or LDAP.