Этот коммит содержится в:
Ihar Hancharenka 2025-01-02 10:41:53 +03:00
родитель 193d77255c
Коммит af6bd354b4
19 изменённых файлов: 190 добавлений и 121 удалений

Просмотреть файл

@ -1,3 +1,6 @@
https://github.com/Amplicode/amplicode-tutorials/blob/main/http-client-demo/app/docker-compose-dev.yaml
+ kafka-ui
2022
https://www.baeldung.com/ops/kafka-docker-setup
! tip about healthcheck in comment

Просмотреть файл

@ -0,0 +1,2 @@
https://plugins.jetbrains.com/plugin/14837-openapi-swagger-editor
https://plugins.jetbrains.com/plugin/8347-zalando-openapi-editor

Просмотреть файл

@ -18,7 +18,15 @@ https://amplicode.ru/guides/flyway-spring-boot-nastroika-i-napisanie-migracii-ba
https://amplicode.ru/blog/
https://amplicode.ru/download/
http-client kts-based
https://habr.com/ru/companies/haulmont/articles/868106/
!!!
2024
Amplicode Launch Event
https://habr.com/ru/companies/haulmont/articles/842770/
https://vkvideo.ru/playlist/-222549074_1
https://www.youtube.com/playlist?list=PLhN84uC7GMW9emgMggtC-gbZOMoTRwoCH
Amplicode - Shustanov - Admin UI 0:00 of 35:12
https://www.youtube.com/watch?v=e-WhYkEYo80
Amplicode - JPA Problems in Spring PetClinic 0:00 of 42:47

Просмотреть файл

@ -1,5 +1,9 @@
http://mapstruct.org/
spring extensions
https://mapstruct.org/documentation/spring-extensions/reference/html/
https://github.com/mapstruct/mapstruct-spring-extensions
https://github.com/mapstruct/mapstruct
https://github.com/mapstruct/mapstruct-examples
@ -9,6 +13,16 @@ http://mapstruct.org/documentation/installation/
http://mapstruct.org/documentation/reference-guide/
http://mapstruct.org/documentation/stable/reference/html/
lombok-int
'org.projectlombok:lombok-mapstruct-binding:0.2.0'
<scope>provided</scope>
If you are using Lombok 1.18.16 or newer you also need to add lombok-mapstruct-binding in order to make Lombok and MapStruct work together.
https://www.baeldung.com/java-mapstruct-lombok
idea-plugin
https://plugins.jetbrains.com/plugin/10036-mapstruct-support
https://github.com/mapstruct/mapstruct-idea
https://www.baeldung.com/tag/mapstruct
2024

Просмотреть файл

@ -1,4 +1,5 @@
https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#using-boot-disabling-specific-auto-configuration
https://github.com/spring-projects/spring-boot/tree/main/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure
export JAVA_OPTS=-Xmx1024m -XX:MaxPermSize=128M

Просмотреть файл

@ -4,5 +4,25 @@ https://docs.spring.io/spring-boot/reference/features/dev-services.html#features
2024
Amplicode - Spring Boot Applications Conterization of 3:49
https://www.youtube.com/watch?v=f_eyfLVgoq8
https://habr.com/ru/companies/haulmont/articles/848696/
!!!
2023
https://spring.io/blog/2023/06/21/docker-compose-support-in-spring-boot-3-1
https://github.com/spring-projects/spring-boot/tree/main/spring-boot-project/spring-boot-docker-compose
dependencies {
implementation (
...
'org.springframework.boot:spring-boot-docker-compose'
)
}
multiple compose files (from 3.4)
spring:
docker:
compose:
file:
- "compose-postgres.yml"
- "compose-redis.yml"

Просмотреть файл

@ -1,2 +0,0 @@
https://github.com/spring-projects/spring-boot/blob/v3.4.1/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayProperties.java
table

Просмотреть файл

@ -0,0 +1 @@
https://www.baeldung.com/spring-boot-jpa-storing-postgresql-jsonb

Просмотреть файл

@ -0,0 +1,11 @@
https://github.com/spring-projects/spring-boot/blob/v3.4.1/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/flyway/FlywayProperties.java
table
https://www.baeldung.com/database-migrations-with-flyway
https://www.baeldung.com/flyway-roll-back
https://www.baeldung.com/flyway-callbacks
2024
https://habr.com/ru/companies/haulmont/articles/829782/
!!! amplicode, jpa-based
equals/hashcode - check objects for HibernateProxy

Просмотреть файл

@ -0,0 +1,18 @@
https://www.liquibase.com
https://www.liquibase.com/pricing
https://docs.liquibase.com/home.html
https://github.com/spring-projects/spring-boot/blob/main/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/liquibase
https://github.com/spring-projects/spring-boot/blob/main/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/liquibase/LiquibaseProperties.java
https://www.baeldung.com/tag/liquibase
https://www.baeldung.com/liquibase-refactor-schema-of-java-app
https://www.baeldung.com/liquibase-vs-flyway
https://www.baeldung.com/liquibase-rollback
https://www.baeldung.com/java-liquibase-list-sql-types
https://www.baeldung.com/java-postgresql-create-schema-before-liquibase
2024
https://habr.com/ru/companies/haulmont/articles/826188/
! amplicode

4
security/server/keycloak/docker.txt Обычный файл
Просмотреть файл

@ -0,0 +1,4 @@
https://www.keycloak.org/server/containers
https://www.keycloak.org/getting-started/getting-started-docker
docker run -p 8081:8080 -e KEYCLOAK_ADMIN=admin -e KEYCLOAK_ADMIN_PASSWORD=admin quay.io/keycloak/keycloak:17.0.1 start-dev
https://hub.docker.com/r/bitnami/keycloak/

39
security/server/keycloak/docs/articles.txt Обычный файл
Просмотреть файл

@ -0,0 +1,39 @@
2023
https://habr.com/ru/companies/axenix/articles/780422/
https://habr.com/ru/articles/779170/
https://habr.com/ru/articles/772010/
https://habr.com/ru/articles/716232/
https://habr.com/ru/articles/772010/
https://habr.com/ru/articles/716232/
! +ABAC
https://github.com/mgalaktionov/keycloak-demo-2
https://itnext.io/what-is-new-in-jakarta-security-3-98db53317e19
https://habr.com/ru/companies/otus/articles/733404/
https://habr.com/ru/articles/546428/
https://habr.com/ru/companies/kaspersky/articles/756812/
https://habr.com/ru/companies/nixys/articles/752994/
https://habr.com/ru/articles/735076/
https://www.baeldung.com/spring-boot-keycloak
https://github.com/eugenp/tutorials/tree/master/spring-boot-modules/spring-boot-keycloak
https://www.baeldung.com/spring-boot-keycloak-integration-testing
with testcontainers
https://habr.com/ru/post/724738/
refresh-token, bad ideology
https://habr.com/ru/post/720070/
application.yaml, KeycloakWebSecurityConfigurerAdapter is depr-ted
spring-security-oauth2-resource-server
2022
https://habr.com/ru/articles/661541/
https://www.keycloak.org/2022/02/adapter-deprecation
https://habr.com/ru/companies/alfastrah/articles/651861/
2021
https://habr.com/ru/companies/reksoft/articles/552346/
https://habr.com/ru/articles/550704/
https://www.baeldung.com/java-keycloak-custom-user-providers
https://www.baeldung.com/keycloak-embedded-in-spring-boot-app
https://github.com/Baeldung/spring-security-oauth/tree/master/oauth-rest/oauth-authorization-server
2020
https://www.baeldung.com/postman-keycloak-endpoints
https://habr.com/ru/companies/southbridge/articles/511380/
HA

3
security/server/keycloak/docs/books.txt Обычный файл
Просмотреть файл

@ -0,0 +1,3 @@
2023
ThorgersenSilva - Keycloak - Identity and Access Management for Modern Applications 2nd ed
2FCEDB79A750149203A1E5CEA5118AA2

6
security/server/keycloak/docs/courses.txt Обычный файл
Просмотреть файл

@ -0,0 +1,6 @@
2024
BoualiAli - [NEW] KEYCLOAK Integration with Spring Boot & Angular 0:00 of 2:28:54
https://www.youtube.com/watch?v=Ppkys9dKadA
2023
RealManual - Egorov - ArgoCD+Keycloak
nnm:1692389

4
security/server/keycloak/docs/docs.txt Обычный файл
Просмотреть файл

@ -0,0 +1,4 @@
https://www.keycloak.org/documentation.html
https://www.keycloak.org/docs-api/21.1.2/javadocs/index.html
https://www.keycloak.org/docs/latest/authorization_services/index.html
https://github.com/keycloak/keycloak-quickstarts/tree/latest/app-authz-rest-springboot

1
security/server/keycloak/docs/guides.txt Обычный файл
Просмотреть файл

@ -0,0 +1 @@
https://github.com/keycloak/keycloak-quickstarts/blob/latest/docs/getting-started.md

Просмотреть файл

@ -0,0 +1,50 @@
2024
Amplicode - Koslov - Spring Security and KC 0:00 of 39:15
https://www.youtube.com/watch?v=CYfzwTt755Q
2023
https://www.youtube.com/watch?v=vmEWywGzWbA
https://github.com/ali-bouali/keycloak-integration-with-spring-boot-3
boot 3, secur 6
23:00
25:30
32:30 - jwt.io debugger
We can assign client roles to realm roles (composite:true)
realmroles->for-specific-role->menu-action->Add associated roles
now it is composite role
# jwt.io: .resource_access.myclient11.roles=client11_admin,client11_user
# https://github.com/ali-bouali/keycloak-integration-with-spring-boot-3/blob/main/src/main/java/com/alibou/keycloak/JwtAuthConverter.java
# JwtGrantedAuthoritiesConverter -> SCOPE_, split(by space) "scope" attr of jwt
user can also be a composite
/realms/<relm-name>/well-known/openid-configuration
token_endpoint
grant_type: password
client_id: ...
username: ...
password: ...
-> refresh_token is also provided
token can be pasted to jwt.io
@PreAuthorize("hasRole('client_role')")
defaultRolePrefix="ROLE_" // !!!
2022
https://www.youtube.com/watch?v=rbKzR6QWKLI&list=PLSVW22jAG8pBnhAdq9S8BpLnZ0_jVBj0c&index=5
2021
Spilca - Software Architecture Fundamentals - Episode 16 - OAuth 2 and OpenID Connect 0:00 of 55:00
https://www.youtube.com/watch?v=j1yOkj2JzwM&list=PLEocw3gLFc8VYPSFuQfTbqsK-0q2wDCoR&index=17
/auth/realms/master/.well-known/openid-configuration
/auth/realms/master/protocol/openid-connect/certs
/auth/realms/master/protocol/openid-connect/token
curl -XPOST "http://localhost:8080/auth/realms/master/protocol/openid-connect/token" \
-H "Content-Type: application/x-www-form-urlencoded" \
--data-urlencode "grant_type=password" \
--data-urlencode "username=<usr> \
--data-urlencode "password=<pwd> \
--data-urlencode "scope=<scope>" \
--data-urlencode "client_id=<client-id>"
application.properties
jwkSetUri=.../certs
new JwkTokenStore(jwkSetUri) // obsolete
...JwtDecoder
Provider
Slurm - Keycloak Exp ru of 3:58:09
https://www.youtube.com/watch?v=Llvnq-n43k0

3
security/server/keycloak/kc-mvn.txt Обычный файл
Просмотреть файл

@ -0,0 +1,3 @@
https://search.maven.org/search?q=a:keycloak-adapter-bom
https://search.maven.org/artifact/org.keycloak.bom/keycloak-adapter-bom/18.0.2/pom
implementation("org.keycloak.bom:keycloak-adapter-bom:18.0.2")

Просмотреть файл

@ -1,35 +1,16 @@
https://www.keycloak.org/
https://www.baeldung.com/tag/keycloak/
https://github.com/keycloak/keycloak
https://www.keycloak.org/documentation.html
https://www.keycloak.org/docs-api/21.1.2/javadocs/index.html
https://www.keycloak.org/docs/latest/authorization_services/index.html
https://github.com/keycloak/keycloak-quickstarts/tree/latest/app-authz-rest-springboot
https://www.baeldung.com/tag/keycloak/
client -> app
client scope -> allow to manage common set of perm-s (default)
guides
https://github.com/keycloak/keycloak-quickstarts/blob/latest/docs/getting-started.md
https://github.com/keycloak/keycloak
token endpoint
https://www.baeldung.com/postman-keycloak-endpoints
https://openid.net/specs/openid-connect-core-1_0.html#TokenEndpoint
https://habr.com/ru/companies/flant/articles/670628/
mvn
https://search.maven.org/search?q=a:keycloak-adapter-bom
https://search.maven.org/artifact/org.keycloak.bom/keycloak-adapter-bom/18.0.2/pom
implementation("org.keycloak.bom:keycloak-adapter-bom:18.0.2")
docker
https://www.keycloak.org/server/containers
https://www.keycloak.org/getting-started/getting-started-docker
docker run -p 8081:8080 -e KEYCLOAK_ADMIN=admin -e KEYCLOAK_ADMIN_PASSWORD=admin quay.io/keycloak/keycloak:17.0.1 start-dev
https://hub.docker.com/r/bitnami/keycloak/
cfg
https://www.keycloak.org/server/all-config
https://github.com/keycloak/keycloak/tree/main/quarkus/config-api/src/main/java/org/keycloak/config
@ -45,101 +26,3 @@ https://www.keycloak.org/server/logging
spring-boot
https://www.keycloak.org/docs/latest/securing_apps/index.html#_spring_boot_adapter
books
2023
ThorgersenSilva - Keycloak - Identity and Access Management for Modern Applications 2nd ed
2FCEDB79A750149203A1E5CEA5118AA2
courses
2024
BoualiAli - [NEW] KEYCLOAK Integration with Spring Boot & Angular 0:00 of 2:28:54
https://www.youtube.com/watch?v=Ppkys9dKadA
2023
RealManual - Egorov - ArgoCD+Keycloak
nnm:1692389
2023
https://habr.com/ru/companies/axenix/articles/780422/
https://habr.com/ru/articles/779170/
https://habr.com/ru/articles/772010/
https://habr.com/ru/articles/716232/
https://habr.com/ru/articles/772010/
https://habr.com/ru/articles/716232/
! +ABAC
https://github.com/mgalaktionov/keycloak-demo-2
https://itnext.io/what-is-new-in-jakarta-security-3-98db53317e19
https://habr.com/ru/companies/otus/articles/733404/
https://habr.com/ru/articles/546428/
https://habr.com/ru/companies/kaspersky/articles/756812/
https://habr.com/ru/companies/nixys/articles/752994/
https://habr.com/ru/articles/735076/
https://www.youtube.com/watch?v=vmEWywGzWbA
https://github.com/ali-bouali/keycloak-integration-with-spring-boot-3
boot 3, secur 6
23:00
25:30
32:30 - jwt.io debugger
We can assign client roles to realm roles (composite:true)
realmroles->for-specific-role->menu-action->Add associated roles
now it is composite role
# jwt.io: .resource_access.myclient11.roles=client11_admin,client11_user
# https://github.com/ali-bouali/keycloak-integration-with-spring-boot-3/blob/main/src/main/java/com/alibou/keycloak/JwtAuthConverter.java
# JwtGrantedAuthoritiesConverter -> SCOPE_, split(by space) "scope" attr of jwt
user can also be a composite
/realms/<relm-name>/well-known/openid-configuration
token_endpoint
grant_type: password
client_id: ...
username: ...
password: ...
-> refresh_token is also provided
token can be pasted to jwt.io
@PreAuthorize("hasRole('client_role')")
defaultRolePrefix="ROLE_" // !!!
https://www.baeldung.com/spring-boot-keycloak
https://github.com/eugenp/tutorials/tree/master/spring-boot-modules/spring-boot-keycloak
https://www.baeldung.com/spring-boot-keycloak-integration-testing
with testcontainers
https://habr.com/ru/post/724738/
refresh-token, bad ideology
https://habr.com/ru/post/720070/
application.yaml, KeycloakWebSecurityConfigurerAdapter is depr-ted
spring-security-oauth2-resource-server
2022
https://www.youtube.com/watch?v=rbKzR6QWKLI&list=PLSVW22jAG8pBnhAdq9S8BpLnZ0_jVBj0c&index=5
https://habr.com/ru/articles/661541/
https://www.keycloak.org/2022/02/adapter-deprecation
https://habr.com/ru/companies/alfastrah/articles/651861/
2021
Slurm - Keycloak Exp ru of 3:58:09
https://www.youtube.com/watch?v=Llvnq-n43k0
https://habr.com/ru/companies/reksoft/articles/552346/
https://habr.com/ru/articles/550704/
https://www.baeldung.com/java-keycloak-custom-user-providers
https://www.baeldung.com/keycloak-embedded-in-spring-boot-app
https://github.com/Baeldung/spring-security-oauth/tree/master/oauth-rest/oauth-authorization-server
Spilca - Software Architecture Fundamentals - Episode 16 - OAuth 2 and OpenID Connect 0:00 of 55:00
https://www.youtube.com/watch?v=j1yOkj2JzwM&list=PLEocw3gLFc8VYPSFuQfTbqsK-0q2wDCoR&index=17
/auth/realms/master/.well-known/openid-configuration
/auth/realms/master/protocol/openid-connect/certs
/auth/realms/master/protocol/openid-connect/token
curl -XPOST "http://localhost:8080/auth/realms/master/protocol/openid-connect/token" \
-H "Content-Type: application/x-www-form-urlencoded" \
--data-urlencode "grant_type=password" \
--data-urlencode "username=<usr> \
--data-urlencode "password=<pwd> \
--data-urlencode "scope=<scope>" \
--data-urlencode "client_id=<client-id>"
application.properties
jwkSetUri=.../certs
new JwkTokenStore(jwkSetUri) // obsolete
...JwtDecoder
Provider
2020
https://www.baeldung.com/postman-keycloak-endpoints
https://habr.com/ru/companies/southbridge/articles/511380/
HA