-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(idp): support Oracle database for JDBC IdP
closes AM-586
- Loading branch information
Titouan Compiegne
committed
Jun 14, 2023
1 parent
d1772ad
commit 9e634b2
Showing
17 changed files
with
203 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
...ntityprovider/gravitee-am-identityprovider-jdbc/src/main/resources/database/oracle.schema
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
-- | ||
-- Script to create Oracle schema | ||
-- Table & index names are suffixed by 3 underscores to define a | ||
-- pattern to replace with the domain name | ||
-- | ||
CREATE TABLE idp_users___ (id NVARCHAR2(64) NOT NULL, username NVARCHAR2(320) NOT NULL, password NVARCHAR2(255) NULL, email NVARCHAR2(320) NULL, metadata CLOB NULL, PRIMARY KEY (id)) | ||
CREATE INDEX idp_users____username_idx ON users(username) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
...avitee/am/identityprovider/jdbc/authentication/JdbcAuthenticationProvider_OracleTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/** | ||
* Copyright (C) 2015 The Gravitee team (http://gravitee.io) | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package io.gravitee.am.identityprovider.jdbc.authentication; | ||
|
||
import io.gravitee.am.identityprovider.jdbc.authentication.spring.JdbcAuthenticationProviderConfiguration; | ||
import io.gravitee.am.identityprovider.jdbc.configuration.JdbcAuthenticationProviderConfigurationTest_Oracle; | ||
import org.springframework.test.context.ContextConfiguration; | ||
import org.springframework.test.context.support.AnnotationConfigContextLoader; | ||
|
||
/** | ||
* @author Titouan COMPIEGNE (titouan.compiegne at graviteesource.com) | ||
* @author GraviteeSource Team | ||
*/ | ||
@ContextConfiguration(classes = { JdbcAuthenticationProviderConfigurationTest_Oracle.class, JdbcAuthenticationProviderConfiguration.class }, loader = AnnotationConfigContextLoader.class) | ||
public class JdbcAuthenticationProvider_OracleTest extends JdbcAuthenticationProviderTest { } |
35 changes: 35 additions & 0 deletions
35
...entityprovider/jdbc/configuration/JdbcAuthenticationProviderConfigurationTest_Oracle.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/** | ||
* Copyright (C) 2015 The Gravitee team (http://gravitee.io) | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package io.gravitee.am.identityprovider.jdbc.configuration; | ||
|
||
import org.springframework.context.annotation.Configuration; | ||
|
||
/** | ||
* @author Titouan COMPIEGNE (titouan.compiegne at graviteesource.com) | ||
* @author GraviteeSource Team | ||
*/ | ||
@Configuration | ||
public class JdbcAuthenticationProviderConfigurationTest_Oracle extends JdbcAuthenticationProviderConfigurationTest { | ||
|
||
public String url() { | ||
return "r2dbc:tc:oracle:///db?TC_IMAGE_TAG=21-slim-faststart"; | ||
} | ||
|
||
@Override | ||
public String protocol() { | ||
return "oracle"; | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
.../src/test/java/io/gravitee/am/identityprovider/jdbc/user/JdbcUserProvider_OracleTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/** | ||
* Copyright (C) 2015 The Gravitee team (http://gravitee.io) | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package io.gravitee.am.identityprovider.jdbc.user; | ||
|
||
import io.gravitee.am.identityprovider.jdbc.configuration.JdbcAuthenticationProviderConfigurationTest_Oracle; | ||
import io.gravitee.am.identityprovider.jdbc.user.spring.JdbcUserProviderConfiguration; | ||
import org.springframework.test.context.ContextConfiguration; | ||
import org.springframework.test.context.support.AnnotationConfigContextLoader; | ||
|
||
/** | ||
* @author Titouan COMPIEGNE (titouan.compiegne at graviteesource.com) | ||
* @author GraviteeSource Team | ||
*/ | ||
@ContextConfiguration(classes = { JdbcAuthenticationProviderConfigurationTest_Oracle.class, JdbcUserProviderConfiguration.class }, loader = AnnotationConfigContextLoader.class) | ||
public class JdbcUserProvider_OracleTest extends JdbcUserProvider_Test { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.