RawCMS icon indicating copy to clipboard operation
RawCMS copied to clipboard

Initial user setup

Open zeppaman opened this issue 4 years ago • 2 comments

User story

When rawcms starts for the first time creates a new user. This user as a fixed username and passwro. This may bring to security issue.

task

Use environment variables to get it form the docker container or from OS. In case this variable wont be set, we will use default values ( username: admin password: rawcmsrocks)

IdentityUser userToAdd = new IdentityUser()
                {
                    UserName = "bob",
                    NormalizedUserName = "BOB",
                    Email = "[email protected]",
                    NormalizedEmail = "[email protected]",
                    NewPassword = "XYZ",//password will be hashed by service
                    
                };
``
https://github.com/arduosoft/RawCMS/blob/master/Plugins/RawCMS.Plugins.Core/Stores/RawUserStore.cs

The env variables will be:
RAWCMS_INITIAL_USER, RAWCMS_INITIAL_PASSWORD, RAWCMS_INITIAL_EMAIL

Update documentation accordingly

## acceptance criteria
The following test is perfomend
- set values for RAWCMS_INITIAL_USER, RAWCMS_INITIAL_PASSWORD, RAWCMS_INITIAL_EMAIL different than the default one
- delete db
- start rawcms
- you can log in with the credential provided into env variables

- the documentation on deploy is updated

zeppaman avatar Mar 06 '20 17:03 zeppaman

@zeppaman I can work on this task

Dansr81 avatar Mar 09 '20 09:03 Dansr81

assigned

zeppaman avatar Mar 09 '20 12:03 zeppaman