-
Notifications
You must be signed in to change notification settings - Fork 0
Migrate from Keycloak to internal OAuth2 authorization server #1
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
Changes from all commits
594210e
cb2f9df
adeef45
9b64d9a
87e19e4
3c81e7a
5f4efaa
ced3206
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,5 @@ | ||||||||||||||||||||||||||||
| CREATE DATABASE workastra_db; | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| CREATE USER workastra_user WITH ENCRYPTED PASSWORD 'workastra_password' ; | ||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||
| GRANT ALL PRIVILEGES ON DATABASE workastra_db TO workastra_user ; | ||||||||||||||||||||||||||||
|
Comment on lines
+1
to
+5
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: find . -type d -name "migration" | head -20Repository: workastra/platform Length of output: 168 🏁 Script executed: find . -type d -name "db" -path "*/migration/*" | head -20Repository: workastra/platform Length of output: 96 🏁 Script executed: fd "flyway\|migration" -t d | head -20Repository: workastra/platform Length of output: 44 🏁 Script executed: git ls-files | grep -i migration | head -20Repository: workastra/platform Length of output: 451 🏁 Script executed: cat -n "./migration/src/main/resources/db/migration/postgresql/V0_1_0__2026-04-23 - Hello World.sql"Repository: workastra/platform Length of output: 6635 🏁 Script executed: cat -n "./migration/src/main/resources/application.yaml"Repository: workastra/platform Length of output: 325 🏁 Script executed: find . -name "docker-compose*" -type fRepository: workastra/platform Length of output: 44 🏁 Script executed: cat "./migration/Dockerfile"Repository: workastra/platform Length of output: 836 🏁 Script executed: cat "./migration/jvm.Dockerfile"Repository: workastra/platform Length of output: 797 🏁 Script executed: wc -l "./migration/src/main/resources/application.yaml"Repository: workastra/platform Length of output: 113 🏁 Script executed: cat -n "./migration/src/main/resources/application.yaml" | tail -50Repository: workastra/platform Length of output: 325 🏁 Script executed: find . -name "docker-compose.yml" -o -name "docker-compose.yaml" | head -10Repository: workastra/platform Length of output: 44 🏁 Script executed: find . -name "Dockerfile" -path "*database*" | head -10Repository: workastra/platform Length of output: 44 🏁 Script executed: cat "./.docker/database/Dockerfile" 2>/dev/null || echo "Not found"Repository: workastra/platform Length of output: 72 🏁 Script executed: ls -la ./.docker/Repository: workastra/platform Length of output: 231 🏁 Script executed: find . -name "application-*.yaml" -o -name "application-*.yml" | head -20Repository: workastra/platform Length of output: 44 🏁 Script executed: find . -name "docker-compose*" | xargs ls -la 2>/dev/null || echo "No docker-compose files found"Repository: workastra/platform Length of output: 1795 🏁 Script executed: ls -la .docker/database/Repository: workastra/platform Length of output: 243 🏁 Script executed: cat .docker/database/Dockerfile 2>/dev/null || echo "No Dockerfile in database"Repository: workastra/platform Length of output: 88 🏁 Script executed: cat compose.yamlRepository: workastra/platform Length of output: 420 🏁 Script executed: cat migration/build.gradle.ktsRepository: workastra/platform Length of output: 772 🏁 Script executed: grep -r "datasource" . --include="*.yaml" --include="*.yml" --include="*.gradle.kts" 2>/dev/null | head -20Repository: workastra/platform Length of output: 44 🏁 Script executed: grep -r "flyway" . --include="*.yaml" --include="*.yml" --include="*.gradle.kts" 2>/dev/null | head -30Repository: workastra/platform Length of output: 420 🏁 Script executed: grep -r "workastra_user\|SPRING_DATASOURCE" . --include="*.yaml" --include="*.yml" --include="*.sh" --include="*.gradle.kts" 2>/dev/nullRepository: workastra/platform Length of output: 44 🏁 Script executed: find . -name "*.yaml" -o -name "*.yml" | xargs grep -l "spring:" 2>/dev/nullRepository: workastra/platform Length of output: 152 🏁 Script executed: cat ./iam/src/main/resources/application.yamlRepository: workastra/platform Length of output: 209 🏁 Script executed: find . -path "*/src/main/resources/application*.yaml" -o -path "*/src/main/resources/application*.yml" | xargs catRepository: workastra/platform Length of output: 420 🏁 Script executed: cat ./config/* 2>/dev/null || echo "No config files"Repository: workastra/platform Length of output: 78 🏁 Script executed: find ./core -name "application*.yaml" -o -name "application*.yml"Repository: workastra/platform Length of output: 44 🏁 Script executed: find . -name "docker-compose*" -o -name "compose*.yaml" -o -name "compose*.yml" | xargs cat 2>/dev/nullRepository: workastra/platform Length of output: 420 🏁 Script executed: grep -r "SPRING_DATASOURCE\|DATABASE_" . --include="Dockerfile*" --include="*.sh" --include="*.yaml" 2>/dev/nullRepository: workastra/platform Length of output: 44 🏁 Script executed: find . -name "*.sh" -type f | xargs grep -l "java\|flyway\|migration" 2>/dev/nullRepository: workastra/platform Length of output: 46 🏁 Script executed: find . -path "*/.github/workflows/*" -name "*.yaml" -o -name "*.yml" | head -5Repository: workastra/platform Length of output: 148 🏁 Script executed: cat ./.github/workflows/workastra_platform.yamlRepository: workastra/platform Length of output: 3666 🏁 Script executed: cat migration/build.gradle.kts | head -40Repository: workastra/platform Length of output: 772 🏁 Script executed: find . -name "MigrationApplication.java" | xargs catRepository: workastra/platform Length of output: 388 🏁 Script executed: grep -r "spring.datasource\|SPRING_DATASOURCE" . --include="*.java" 2>/dev/null | head -20Repository: workastra/platform Length of output: 44 🏁 Script executed: find . -name "application*.properties" 2>/dev/null | xargs cat 2>/dev/nullRepository: workastra/platform Length of output: 44 🏁 Script executed: cat core/build.gradle.ktsRepository: workastra/platform Length of output: 665 🏁 Script executed: find . -type f \( -name "*.sh" -o -name "Dockerfile*" \) | xargs grep -l "migration\|flyway" 2>/dev/nullRepository: workastra/platform Length of output: 123 🏁 Script executed: grep -r "MigrationApplication\|SpringApplication" . --include="*.java" -A 5 -B 2 2>/dev/null | head -40Repository: workastra/platform Length of output: 3470 🏁 Script executed: find . -path "*/.docker/*" -type f | xargs cat 2>/dev/nullRepository: workastra/platform Length of output: 234 🏁 Script executed: cat build.gradle.kts | grep -A 20 -B 5 "migration"Repository: workastra/platform Length of output: 44
Either make 🔧 Suggested fix-CREATE DATABASE workastra_db;
-
CREATE USER workastra_user WITH ENCRYPTED PASSWORD 'workastra_password' ;
+
+CREATE DATABASE workastra_db OWNER workastra_user;
GRANT ALL PRIVILEGES ON DATABASE workastra_db TO workastra_user ;
+
+\connect workastra_db
+GRANT ALL ON SCHEMA public TO workastra_user;Alternatively, keep ownership with \connect workastra_db
GRANT CREATE, USAGE ON SCHEMA public TO workastra_user;📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||
This file was deleted.
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.
Avoid hardcoding the database password in the bootstrap script.
workastra_passwordis checked into source control. Even for local dev, prefer parameterizing via environment variables (e.g., a.shinitdb script that reads${WORKASTRA_DB_PASSWORD}) so the same script can be safely reused beyond local dev. Also, the trailing whitespace before;on lines 3 and 5 is cosmetic noise.🤖 Prompt for AI Agents