nexus-public icon indicating copy to clipboard operation
nexus-public copied to clipboard

NPM Auth Token does not work with Keycloak

Open rkesters opened this issue 1 year ago • 1 comments

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.

  • What problem are you trying to solve? Using npm authtoken to auth when install deps fails, when user is not a local user.

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"
  1. 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)
  • Do you have a workaround you are using at present?

not really, basic auth does not work either.

  • What feature or behavior is this required for?

  • How could we solve this issue? (Not knowing is okay!)

  • Tell us about your Nexus Repository deployment: what version, operating system, and database are you using?

    • version | 3.30.0-01
    • edition | OSS
    • buildRevision | d13afa6e08048d2d93682fe62398b0b7b5f13652
    • buildTimestamp | 2021-03-03-0055-34190
  • Anything else?

rkesters avatar Jun 07 '23 20:06 rkesters