Search code examples
playframework-2.3typesafe-activator

What is the activator command to generate application secret?


I'm using Play Framework 2.3.6. Since Play 2.3.x play commands are replaced with activator commands. Play's documentation for 2.3.x as well as latest 2.4.x mentions commands play-generate-secret and play-update-secret but I am not able to find corresponding activator commands.

We may not choose to use these secrets for production environment but would like play to generate secrets for integration and pre-prod environments - which we can change frequently.

Has anyone done this before? What are the proper activator commands?


Solution

  • Both

    activator play-generate-secret
    

    and

    activator play-update-secret
    

    work well for the Activator.

    You can find their definition here in the sources. And as you can see they are part of Play and not the Activator.

    val generateSecret = TaskKey[String]("play-generate-secret", "Generate a new application secret", KeyRanks.BTask)
    val updateSecret = TaskKey[File]("play-update-secret", "Update the application conf to generate an application secret", KeyRanks.BTask)