Skip to content

cdpy authentication #107

Answered by wmudge
tomateoooh asked this question in Q&A
Jan 13, 2025 · 3 comments · 5 replies
Discussion options

You must be logged in to vote

Hi Tom,

cdpy wraps/delegates to the underlying EnvProvider in the cdpcli package. This code tests the value of the environment variable CDP_PRIVATE_KEY by first checking if it is a file and then if the value is hashed. If not, it throws the error you are seeing, which is a bit misleading.

if not os.path.isfile(private_key):
    if Ed25519v1Auth.detect_private_key(private_key):
        private_key_value = private_key
    else:
        raise NoCredentialsError(
            err_msg='Private key file {} does not exist'.format(private_key))
else:
    private_key_value = open(private_key).read()

https://github.com/cloudera/cdpcli/blob/master/cdpcli/credentials.py#L187-L194

It appears that indee…

Replies: 3 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@wmudge
Comment options

Answer selected by wmudge
@tomateoooh
Comment options

Comment options

You must be logged in to vote
3 replies
@wmudge
Comment options

@tomateoooh
Comment options

@wmudge
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
2 participants