added smtp support, fixed https loop
This commit is contained in:
@@ -1,4 +1,6 @@
|
|||||||
realm: $(REALM_NAME)
|
realm: $(REALM_NAME)
|
||||||
|
hostname: $(KEYCLOAK_HOSTNAME)
|
||||||
|
frontendUrl: $(KEYCLOAK_HOSTNAME)
|
||||||
enabled: true
|
enabled: true
|
||||||
displayName: $(REALM_DISPLAY_NAME)
|
displayName: $(REALM_DISPLAY_NAME)
|
||||||
loginTheme: Blue_stripes
|
loginTheme: Blue_stripes
|
||||||
@@ -6,30 +8,25 @@ attributes:
|
|||||||
userProfileEnabled: true
|
userProfileEnabled: true
|
||||||
registrationAllowed: true
|
registrationAllowed: true
|
||||||
registrationEmailAsUsername: false # Set to true if you want email as username
|
registrationEmailAsUsername: false # Set to true if you want email as username
|
||||||
editUsernameAllowed: false # Prevent username changes after registration
|
editUsernameAllowed: true # Prevent username changes after registration
|
||||||
|
|
||||||
internationalizationEnabled: true
|
internationalizationEnabled: true
|
||||||
defaultLocale: ru
|
defaultLocale: ru
|
||||||
supportedLocales:
|
supportedLocales:
|
||||||
- ru
|
- ru
|
||||||
|
|
||||||
userProfile:
|
smtpServer:
|
||||||
attributes:
|
# Sender Details
|
||||||
- name: "username"
|
from: $(EMAIL_ADRESS)
|
||||||
displayName: ${username}
|
fromDisplayName: $(REALM_NAME)
|
||||||
|
|
||||||
permissions:
|
# Connection Settings
|
||||||
view: ["admin", "user"]
|
host: $(SMTP_HOST)
|
||||||
edit: ["admin", "user"]
|
port: $(SMTP_PORT) # Common ports: 25, 465 (SSL), 587 (TLS)
|
||||||
|
auth: true
|
||||||
|
ssl: $(SMTP_SSL) # Enable for port 465
|
||||||
|
starttls: $(SMTP_STARTLS) # Enable for port 587
|
||||||
|
|
||||||
- name: "email"
|
# Authentication Credentials (use string values directly)
|
||||||
displayName: ${email}
|
user: $(SMTP_USER)
|
||||||
required:
|
password: $(SMTP_PASSWORD)
|
||||||
roles: ["user"]
|
|
||||||
permissions:
|
|
||||||
view: ["admin", "user"]
|
|
||||||
edit: ["admin", "user"]
|
|
||||||
validations:
|
|
||||||
email: {}
|
|
||||||
|
|
||||||
unmanagedAttributePolicy: "ADMIN_VIEW"
|
|
||||||
|
|||||||
@@ -8,3 +8,24 @@ users:
|
|||||||
realm-management:
|
realm-management:
|
||||||
- view-users
|
- view-users
|
||||||
- query-users
|
- query-users
|
||||||
|
|
||||||
|
userProfile:
|
||||||
|
attributes:
|
||||||
|
- name: "username"
|
||||||
|
displayName: ${username}
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
view: ["admin", "user"]
|
||||||
|
edit: ["admin", "user"]
|
||||||
|
|
||||||
|
- name: "email"
|
||||||
|
displayName: ${email}
|
||||||
|
required:
|
||||||
|
roles: ["user"]
|
||||||
|
permissions:
|
||||||
|
view: ["admin", "user"]
|
||||||
|
edit: ["admin", "user"]
|
||||||
|
validations:
|
||||||
|
email: {}
|
||||||
|
|
||||||
|
unmanagedAttributePolicy: "ADMIN_VIEW"
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ services:
|
|||||||
KC_HEALTH_ENABLED: "true"
|
KC_HEALTH_ENABLED: "true"
|
||||||
KC_LOG_LEVEL: INFO
|
KC_LOG_LEVEL: INFO
|
||||||
KC_HOSTNAME: ${KEYCLOAK_HOSTNAME}
|
KC_HOSTNAME: ${KEYCLOAK_HOSTNAME}
|
||||||
|
KC_HOSTNAME_STRICT: false
|
||||||
KC_PROXY: edge
|
KC_PROXY: edge
|
||||||
KC_HTTP_ENABLED: "true"
|
KC_HTTP_ENABLED: "true"
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
@@ -24,6 +24,5 @@ server {
|
|||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_set_header X-Forwarded-Proto https;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user