/
OAuth2 プロバイダの構成方法
OAuth2 プロバイダの構成方法
OpenLegacy は、バージョン4.5以降、標準 Spring Security をサポートしています。
ここでは、OAuth2 プロバイダ をJDBC, LDAP または ADで利用するプロパティの設定について説明します:
アプリケーションyamlに、以下を追加します:
spring:
security:
oauth2:
resourceserver:
# ---EXAMPLE---
jwt:
jwk-set-uri: http://localhost:8080/.well-known/jwks.json
JDBCの場合:
JDBC properties
ol:
security:
db:
init-schema: true
clients:
- client-id: client_id
client-secret: '{noop}client_secret'
scope: read,write,trust,ol_admin
authorized-grant-types: password
# USER CONFIGURATION WORKS ONLY WITH JDBC PROVIDER
users:
- username: user
password: '{noop}password'
デフォルトの pom.xml に、次のdependencyを追加します:
<dependency>
<groupId>org.openlegacy</groupId>
<artifactId>openlegacy-security-client-jdbc</artifactId>
<version>${openlegacy.version}</version>
</dependency>
<dependency>
<groupId>org.openlegacy</groupId>
<artifactId>openlegacy-security-user-jdbc</artifactId>
<version>${openlegacy.version}</version>
</dependency> |
LDAPの場合:
次の dependencyを削除します:
<dependency>
<groupId>org.openlegacy</groupId>
<artifactId>openlegacy-security-user-jdbc</artifactId>
<version>${openlegacy.version}</version>
</dependency> |
代わりに、次の dependency を追加します:
<dependency>
<groupId>org.openlegacy</groupId>
<artifactId>openlegacy-security-user-ldap</artifactId>
<version>${openlegacy.version}</version>
</dependency> |
Active Directoryの場合:
次の dependencyを削除します:
dependency>
<groupId>org.openlegacy</groupId>
<artifactId>openlegacy-security-user-jdbc</artifactId>
<version>${openlegacy.version}</version>
</dependency> |
代わりに、次の dependency を追加します:
<dependency>
<groupId>org.openlegacy</groupId>
<artifactId>openlegacy-security-user-active-directory</artifactId>
<version>${openlegacy.version}</version>
</dependency> |
, multiple selections available,
Related content
API プロパティ構成
API プロパティ構成
More like this
How to Configure OAuth2 Provider
How to Configure OAuth2 Provider
More like this
How To Disable OAuth2 Security in OpenLegacy API Projects
How To Disable OAuth2 Security in OpenLegacy API Projects
More like this
JWTトークン検証を有効にする - OpenLegacy API
JWTトークン検証を有効にする - OpenLegacy API
More like this
Enable JWT Token Validation - OpenLegacy API
Enable JWT Token Validation - OpenLegacy API
More like this