Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to retrieve secret value #947

Open
gruyaume opened this issue Sep 8, 2023 · 5 comments
Open

Unable to retrieve secret value #947

gruyaume opened this issue Sep 8, 2023 · 5 comments
Labels
3.2 Target juju 3.2 bug work-in-progress disables stale bot

Comments

@gruyaume
Copy link

gruyaume commented Sep 8, 2023

Description

I am unable to retrieve the Juju secret content. I'm not certain whether this is a real bug or whether "I'm holding it wrong". In any case I haven't found how this can be done by looking at the documentation.

Whenever I try to retrieve the juju secret value, I receive "None" even though I know the secret exists and has some content (via the CLI).

Urgency

Blocker for our release

Python-libjuju version

3.2.2

Juju version

3.1.5

Reproduce / Test

Here's how I am using the lib:

from juju import jasyncio
from juju.model import Model


async def main():

    m = Model()
    await m.connect()

    secrets = await m.list_secrets(show_secrets=True)

    first_secret = secrets.results[0]
    print(first_secret.value)
    await m.disconnect()


if __name__ == '__main__':
    jasyncio.run(main())

And the results I'm getting:

None

On the other hand, I am able to get the secret via the Juju CLI

(venv) guillaume@thinkpad:~/code/vault-k8s-operator$ juju secrets
ID                    Owner      Rotation  Revision  Last updated
cjt5s4lp3des77vsgehg  vault-k8s  never            1  36 minutes ago 
(venv) guillaume@thinkpad:~/code/vault-k8s-operator$ juju show-secret cjt5s4lp3des77vsgehg --reveal
cjt5s4lp3des77vsgehg:
  revision: 1
  owner: vault-k8s
  created: 2023-09-07T23:34:42Z
  updated: 2023-09-07T23:34:42Z
  content:
    roottoken: hvs.p9v8yPn1iM0tE3w20vRyVmED
    unsealkeys: '["8adf4e322076da1de3a1b955f1a2edd0edd726ed171424b6c82cf769d9e709e0"]'
@gruyaume gruyaume added the bug label Sep 8, 2023
@cderici cderici added the 3.2 Target juju 3.2 label Sep 21, 2023
@github-actions
Copy link

This issue is marked as incomplete because it has been open 30 days with no activity. Please remove incomplete label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the incomplete old issue, check if it's still valid label Oct 22, 2023
@gruyaume
Copy link
Author

@cderici This issue was automatically marked as incomplete. Is there any effort placed on implementing what is required here?

@github-actions github-actions bot removed the incomplete old issue, check if it's still valid label Oct 24, 2023
@cderici
Copy link
Member

cderici commented Oct 24, 2023

@cderici This issue was automatically marked as incomplete. Is there any effort placed on implementing what is required here?

Sorry for the late response, Guillaume, I do have an active ticket for this, I'll take a look very soon. Though keep in mind, the support for the secrets are pretty rudimentary at this point (on libjuju), only some basic stuff that Juan implemented to enable people to use it a little bit. We'll have a proper roadmap item to bring full support of secrets in the next cycle to both pylibjuju and the terraform provider.

Copy link

This issue is marked as incomplete because it has been open 30 days with no activity. Please remove incomplete label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the incomplete old issue, check if it's still valid label Nov 24, 2023
Copy link

This issue was closed because it has been stalled for 5 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 29, 2023
@cderici cderici reopened this Nov 29, 2023
@cderici cderici added work-in-progress disables stale bot and removed incomplete old issue, check if it's still valid labels Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.2 Target juju 3.2 bug work-in-progress disables stale bot
Projects
None yet
Development

No branches or pull requests

2 participants