From 97e0249d381ea9f45f173f76961c80f933dd608c Mon Sep 17 00:00:00 2001 From: Lee Brown Date: Mon, 15 Jul 2019 18:34:58 -0800 Subject: [PATCH] Auto generate random password for creation of RDS database instance. --- internal/user/auth.go | 2 +- tools/devops/README.md | 7 +++++++ tools/devops/cmd/cicd/service_deploy.go | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/internal/user/auth.go b/internal/user/auth.go index 076aea9..897d268 100644 --- a/internal/user/auth.go +++ b/internal/user/auth.go @@ -109,7 +109,7 @@ func generateToken(ctx context.Context, dbConn *sqlx.DB, tknGen TokenGenerator, // Build select statement for users_accounts table to find all the user accounts for the user f := func() ([]userAccount, error) { - query := sqlbuilder.NewSelectBuilder().Select("ua.account_id, ua.roles, ua.status as userStatus, ua.archived_at userArchived, a.status as accountStatus, a.archived_at, a.timezone, u.timezone as accountArchived"). + query := sqlbuilder.NewSelectBuilder().Select("ua.account_id, ua.roles, ua.status as userStatus, ua.archived_at userArchived, a.status as accountStatus, a.archived_at, a.timezone, u.timezone as userTimezone"). From(userAccountTableName+" ua"). Join(accountTableName+" a", "a.id = ua.account_id"). Join(userTableName+" u", "u.id = ua.user_id") diff --git a/tools/devops/README.md b/tools/devops/README.md index 540e8c3..549de80 100644 --- a/tools/devops/README.md +++ b/tools/devops/README.md @@ -26,6 +26,13 @@ in other configuration files. And since this project is open-source, we wanted t If you don't have an AWS account, signup for one now and then proceed with the deployment setup. +We assume that if you are deploying the SaaS Stater Kit, you are starting from scratch with no existing dependencies. +This however, excludes any domain names that you would like to use for resolving your services publicly. To use any +pre-purchased domain names, make sure they are added to Route 53 in the AWS account. Or you can let the deploy script +create a new zone is Route 53 and update the DNS for the domain name when your ready to make the transition. It is +required to hosted the DNS on Route 53 so DNS entries can be managed by this deploy tool. It is possible to use a +[subdomain that uses Route 53 as the DNS service without migrating the parent domain](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/CreatingNewSubdomain.html). + ## Getting Started diff --git a/tools/devops/cmd/cicd/service_deploy.go b/tools/devops/cmd/cicd/service_deploy.go index 38ec8d7..000cd63 100644 --- a/tools/devops/cmd/cicd/service_deploy.go +++ b/tools/devops/cmd/cicd/service_deploy.go @@ -831,7 +831,7 @@ func NewServiceDeployRequest(log *log.Logger, flags ServiceDeployFlags) (*servic DBName: aws.String("shared"), Engine: aws.String("postgres"), MasterUsername: aws.String("god"), - MasterUserPassword: aws.String("mypassword"), // When empty auto generated. + MasterUserPassword: uuid.NewRandom().String(), Port: aws.Int64(5432), DBInstanceClass: aws.String("db.t2.small"), AllocatedStorage: aws.Int64(20),