Skip to content

Better secret management for tokens and ids #272

@Hypercookie

Description

@Hypercookie

The clockify-cli uses an underlying YAML file located at ~/.clockify-cli.yaml to manage settings. This file also includes the userid, workspaceid, and token in plain text, which may not be desirable for all users.

While it is possible to set the token (and other IDs) via the command line, this approach is also insecure as it exposes the sensitive data in the command history. To address this, there are two secure alternatives that could be implemented:

  • Credential Process Support
    Similar to the AWS config file, a credential_process parameter could be introduced, allowing users to specify a command responsible for securely returning the credential. For example, a user could configure credential_process: pass show clockify, enabling the pass utility to handle security and encryption. This parameter would be optional in the YAML file and, if present, would take precedence over any token supplied manually. This approach is more flexible, secure, and versatile, but it might be more challenging to implement.

  • YAML !include Support
    Allow the YAML syntax to support !include, enabling users to reference another YAML file containing sensitive data. This secondary YAML file could be stored in a more secure location, such as a removable device, providing better protection for sensitive information.

While the first option offers greater security and flexibility, it is more complex to implement. Nevertheless, either approach would significantly enhance security for users.

I love this project and use it all the time, so I’d be thrilled to see these features implemented. While I’m not experienced in Go programming, I’ll take a look at the code to see if I can contribute in some way.

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions