-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[internal-1486] logto version upgrade and use logto schema #671
Conversation
…evidence/d2e into SantanM/internal-1486_logto-schema
@@ -452,6 +452,7 @@ services: | |||
"+cdw_config": {}, | |||
"+dataflow": {}, | |||
"+db_credentials_mgr": {}, | |||
"+logto": {}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A schema for logto
tables
@@ -473,7 +474,9 @@ services: | |||
"reader": "${PG_WRITE_USER:-alp_pg_write_user}", | |||
"readerPassword": "${PG_WRITE_PASSWORD}", | |||
"writer": "${PG_WRITE_USER:-alp_pg_write_user}", | |||
"writerPassword": "${PG_WRITE_PASSWORD}" | |||
"writerPassword": "${PG_WRITE_PASSWORD}", | |||
"logtoManager": "${PG_LOGTO_MANAGER:-logto_postgres}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PG user that manages logto
schema. It has the following privileges - USAGE, CREATE and GRANT (can further grant privileges to other pg users) privileges.
@@ -719,14 +725,14 @@ services: | |||
entrypoint: | |||
- sh | |||
- -c | |||
- npm run cli db seed -- --swe && npx @logto/cli db alteration deploy 1.18.0 && npm start | |||
- npm start |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see below alp-logto-seed
@@ -735,6 +741,28 @@ services: | |||
PROJECT_NAME: ${PROJECT_NAME:-d2e} | |||
PORT: 3001 | |||
TRUST_PROXY_HEADER: true | |||
DATABASE_CONNECTION_TIMEOUT: 30000 | |||
|
|||
alp-logto-seed: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Separate seeding and migration of logto
schema to reduce the startup time of the container.
@@ -123,6 +125,11 @@ export class App { | |||
pgUsers.managerPassword, | |||
"Manager" | |||
); | |||
await this.userDao.createUserWithCreateRolePrivilege( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logtoManager
will need privileges to create new roles. Logto database migrations include creation of logto_tenant_<db>_default/admin
users.
@@ -128,12 +148,15 @@ export default class PGUserDAO { | |||
grantManagePrivilegesForSchema = async ( | |||
client: any, | |||
schemaName: string, | |||
user: string | |||
user: string, | |||
withGrantOption: boolean |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flag - to allow the user to grant
privileges to other users. logtoManage
user needs the privileges to further grant rights to other users logto_tenant_<db>_default/admin
.
@@ -12,10 +12,10 @@ RUN npm add --location=global pnpm@^9.0.0 | |||
RUN apk add --no-cache python3 make g++ rsync py3-setuptools git | |||
|
|||
## Git clone | |||
RUN git clone --branch v1.18.0 https://github.com/logto-io/logto.git /etc/logto | |||
# TODO: clone d2e logto instead of public repo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Task created
…evidence/d2e into SantanM/internal-1486_logto-schema
d87110f
to
ffadfeb
Compare
b542dac
to
1edb5cf
Compare
…evidence/d2e into SantanM/internal-1486_logto-schema
A PR with relevant changes to the logto service is here.
Merge Checklist
Please cross check this list if additions / modifications needs to be done on top of your core changes and tick them off. Reviewer can as well glance through and help the developer if something is missed out.
develop
branch)