Skip to content

Create deploy tokens instead of using passwords for deployment #726

@danielcompton

Description

@danielcompton

Currently, a user's Clojars password is used to log in to Clojars, and to deploy packages.

If a users's password is leaked, an attacker can deploy packages, and log in to Clojars and change the Clojars user's email address. Occasionally Clojars passwords do get checked in to source control.

We should consider adding a concept of "deploy tokens" for Clojars which users could switch to instead of providing their password when deploying. New users would be required to use deploy tokens, and existing users could migrate over to deploy tokens, and disable the use of password deployment.

Our deploy tokens could have a prefix like CLOJARS_ which would then mean we could submit them to GitHub to be included in the token scanning system.

If we did this, we'd need to start keeping track of when password deployment was last used, so that people could safely disable it once they had moved away from providing their password. We'd also need to update any existing documentation for Clojars + third-party tooling that shows how to set your Clojars password for deployment.

Todo:

  • Add tokens table & queries
  • Add token auth to repo route
  • Add last used tracking
  • Add UI to manage tokens
  • Add endpoint for GitHub to report scanning hits to
  • Add outgoing email for ^
  • Register token with GitHub scanner

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions