Display job secrets (OD-196)
Michael Weimann opened 5 years ago

As a project admin I want to see the job secrets,
so I know that is in there.

Affected area:

  • Open project settings
  • "Build Settings"
  • Add a job secret
  • Click edit

At the moment it displays an empty input field.

Suggestions:

  • It should be displayed with placeholders, e.g. 10 ●
  • There could be a "show secret" action that reveals the value
  • Michael Weimann changed title 5 years ago
    Previous Value Current Value
    Cannot see job secrets
    Display job secrets
  • Michael Weimann changed fields 5 years ago
    Name Previous Value Current Value
    Assignee
    robin
    mweimann
  • Michael Weimann commented 5 years ago

    @robin if you agree with the suggestion is okay I could provide the code.
    Waiting for your response.

  • Robin Shen commented 5 years ago

    It is designed this way for security reason. Something like GitHub does for secrets.

  • bufferUnderrun commented 5 years ago

    I agree with Robin.

    We mainly use secret in a Job to connect to other server and access ressources. I accept my coworker can modify source code and/or launch job but not retrieve my secret (password)

  • Robin Shen commented 5 years ago

    One thing to note, if your coworker has administrative rights to the project, he/she can still reveal value of the secret by modifying build spec directly to print it.

  • Michael Weimann commented 5 years ago

    One thing to note, if your coworker has administrative rights to the project, he/she can still reveal value of the secret by modifying build spec directly to print it.

    That was my thought. If you can print the variables anyway the security benefit is not that high. GitLab does it the "reveal"-Button way.

  • Robin Shen commented 5 years ago

    Hmm... Maybe we should provide this feature (for project administrators only) for convenience, as it is not possible to keep the value really secret for project administrators.

  • Michael Weimann commented 5 years ago

    Here is a screenshot from a GitLab project:

    image.png

    Maybe this could be the way:

    • Empty field - if empty
    • Otherwise fixed number of ● as a placeholder
    • "reveal" button that shows the actual values
    • I also like the "mask" option since it hides the values in the log

    → Improvement for admins to check their variables + avoiding to print secrets in the builds.

    To separate things: this ticket is only about displaying the secrets for admins.
    If the other points are useful I could write another issue.

  • bufferUnderrun commented 5 years ago

    One thing to note, if your coworker has administrative rights to the project, he/she can still reveal value of the secret by modifying build spec directly to print it.

    Wohhhh, you're right.

    Hmm... Maybe we should provide this feature (for project administrators only) for convenience, as it is not possible to keep the value really secret for project administrators.

    1. as far as i know, the only use case of secret is for Job ?
    2. user without administrative rights to the project can't access to project setting
    3. BUT user with source code write rights can modify build to print secret !

    There is a problem with (3) !! What about having a different rights for build editing ?

  • Michael Weimann commented 5 years ago

    BUT user with source code write rights can modify build to print secret !

    • You can set up the branches that have access to the secrets
    • Also you can set up special review rules for these branches
    • e.g. you have to review it

    image_2.png

    image_3.png

  • Robin Shen commented 5 years ago

    So effectively only project administrator can determine who can access the secret. So it is consistent to have them reveal the value.

  • bufferUnderrun commented 5 years ago

    Thank you for help and screenshoot about feature i didn't know. I've update all my project's config and now it's secure !

    So you're right, it is consistent to have them reveal BUT admin have to setup config VERY CAREFULLY.

  • OneDev changed state to 'Closed' 5 years ago
    Previous Value Current Value
    Open
    Closed
  • OneDev changed state to 'Released' 5 years ago
    Previous Value Current Value
    Closed
    Released
issue 1/1
Type
Improvement
Priority
Normal
Assignee
Issue Votes (0)
Watchers (3)
Reference
OD-196
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover