Hello, I’m trying to use Admin Client and we have ...
# help
r
Hello, I’m trying to use Admin Client and we have manifest configured like:
Copy code
adminAPI:
                enabled: true
                adminCredentials:
                  username: cerbos
                  passwordHash: JDJ5JDEwJEkzR3NEOFpqd3ZLSVBMVlR4N2NZUy55QnpsT1Z5aEIxbDA5VmxOdFI5SUpJV2wxbS8zaG5DCgo=
then, the app that uses it has the following `.env`:
Copy code
CERBOS_ADMIN_USERNAME="cerbos"
CERBOS_ADMIN_PASSWORD_HASH="JDJ5JDEwJEkzR3NEOFpqd3ZLSVBMVlR4N2NZUy55QnpsT1Z5aEIxbDA5VmxOdFI5SUpJV2wxbS8zaG5DCgo="
but when calling admin api through the SDK, i get the following error:
gRPC error 16 (UNAUTHENTICATED): incorrect credentials
o
Hi @Roman Levytskyi, IIRC the names for the environment parameters are
CERBOS_USERNAME
and
CERBOS_PASSWORD
.
r
i pass (map) them manually to the SDK, i do not expect them to be read automatically
like this:
Copy code
{
            tls: false,
            url: process.env.CERBOS_URL,
            adminCredentials: {
              username: process.env.CERBOS_ADMIN_USERNAME,
              password: process.env.CERBOS_ADMIN_PASSWORD_HASH,
            },
          }
@oguzhan any other ideas?
o
I think the problem occurs because you are providing the hashed password, rather than the plaintext password to the SDK
r
yes, you’re right
thank you!
🎉 1