opentdf / otdfctl

OpenTDF command line interface
BSD 3-Clause Clear License
7 stars 3 forks source link

Auth client-credentials issues #430

Open shanedell opened 4 hours ago

shanedell commented 4 hours ago

Multiple issues found:

  1. After release 0.9.0, the auth client-credentials command no longer supports --client-id and --client-secret.
  2. --with-client-creds and --with-client-creds-file not stopping the prompt from coming up.

    • When running:
       go run auth client-credentials \
           --host http://localhost:8080 \
           --with-client-creds '{"clientId":"opentdf","clientSecret":"secret"}'
    • The below screenshot is gotten:
    Screenshot 2024-11-19 at 5 25 36 PM
    • The same thing happens using --with-client-creds-file with that same content in the file
  3. After getting past entering the data, if running keycloak in docker I always get this error:
    ERROR    could not authenticate: failed to get platform configuration: Get "http://keycloak:8888/auth/realms/opentdf/.well-known/openid-configuration": dial tcp: lookup keycloak: no such host
    • This is even when setting --host http://localhost:8080.

When testing I tested all releases from that had name otdfctl and only 0.6.0 - 0.9.0 worked properly for me, number 2 wasn't really tested though with these ones but in later releases it was.

shanedell commented 4 hours ago

I'd be willing to submit a PR to help with these issues.

However, would 1 be solved by:

  1. Updating the docs to reference with --with-client-creds and/or --with-client-creds-file
  2. Adding support for --client-id and client-secret back in?