cloudera / cloudera/cdpcli

Using Credential Environment Variables to login

Open
#5 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
13
Forks
16
PR merge metrics
No merged PRs in 30d

Description

Hi,

I am trying to use credential environment variables to log into the CLI. I set my CDP_ACCESS_KEY_ID and CDP_PRIVATE_KEY as two strings, as they are presented in the API Access Key:
image

I'm getting the following error:
cdpy.common.CdpError: CdpError(NoCredentialsError('Unable to locate CDP credentials: Private key file does not exist.'))

Which suggests to me that the code expects a path to a private key file. This seems odd to me, as a file is unnecessary when the token is available in the environment variable. Is this the intended behaviour? Using a file, rather than the string directly from the variable seems less secure as the credentials will be just available to read.

Thanks,
Tom

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing CLI login with CDP_ACCESS_KEY_ID and CDP_PRIVATE_KEY set to strings, then trace the credential-resolution path that raises cdpy.common.CdpError. Check whether the documented environment variables are treated as values or as a private-key file path; done means the intended behavior is confirmed and covered by an appropriate test or clarified error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
authentication, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.