https://cerbos.dev logo
#help
Title
# help
r

Roman Levytskyi

12/15/2023, 9:48 AM
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

oguzhan

12/15/2023, 9:58 AM
Hi @Roman Levytskyi, IIRC the names for the environment parameters are
CERBOS_USERNAME
and
CERBOS_PASSWORD
.
r

Roman Levytskyi

12/15/2023, 9:59 AM
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

oguzhan

12/15/2023, 10:21 AM
I think the problem occurs because you are providing the hashed password, rather than the plaintext password to the SDK
r

Roman Levytskyi

12/15/2023, 10:43 AM
yes, you’re right
thank you!
🎉 1
3 Views