-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor FederatedAuthPlugin and add unit tests
- Loading branch information
1 parent
4340cfa
commit 15a5ba6
Showing
22 changed files
with
1,753 additions
and
488 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
54 changes: 0 additions & 54 deletions
54
docs/using-the-jdbc-driver/using-plugins/UsingTheFederatedAuthPlugin.md
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ | |
package software.amazon; | ||
|
||
import software.amazon.jdbc.PropertyDefinition; | ||
import software.amazon.jdbc.plugin.FederatedAuthConnectionPlugin; | ||
import software.amazon.jdbc.plugin.federatedauth.FederatedAuthConnectionPlugin; | ||
import java.sql.Connection; | ||
import java.sql.DriverManager; | ||
import java.sql.ResultSet; | ||
|
@@ -35,15 +35,15 @@ public static void main(String[] args) throws SQLException { | |
|
||
// Enable the AWS Federated Authentication Connection Plugin. | ||
properties.setProperty(PropertyDefinition.PLUGINS.name, "federatedAuth"); | ||
properties.setProperty(FederatedAuthConnectionPlugin.IDP_HOST.name, "ec2amaz-ab3cdef.example.com"); | ||
properties.setProperty(FederatedAuthConnectionPlugin.IDP_NAME.name, "adfs"); | ||
properties.setProperty(FederatedAuthConnectionPlugin.IDP_ENDPOINT.name, "ec2amaz-ab3cdef.example.com"); | ||
properties.setProperty(FederatedAuthConnectionPlugin.IAM_ROLE_ARN.name, "arn:aws:iam::123456789012:role/adfs_example_iam_role"); | ||
properties.setProperty(FederatedAuthConnectionPlugin.IAM_IDP_ARN.name, "arn:aws:iam::123456789012:saml-provider/adfs_example"); | ||
properties.setProperty(FederatedAuthConnectionPlugin.IAM_REGION.name, "us-east-2"); | ||
properties.setProperty(FederatedAuthConnectionPlugin.IDP_USER_NAME.name, "[email protected]"); | ||
properties.setProperty(FederatedAuthConnectionPlugin.IDP_USER_PASSWORD.name, "somePassword"); | ||
properties.setProperty(FederatedAuthConnectionPlugin.IDP_USERNAME.name, "[email protected]"); | ||
properties.setProperty(FederatedAuthConnectionPlugin.IDP_PASSWORD.name, "somePassword"); | ||
properties.setProperty(PropertyDefinition.USER.name, "someIamUser"); | ||
|
||
|
||
// Try and make a connection: | ||
try (final Connection conn = DriverManager.getConnection(CONNECTION_STRING, properties); | ||
final Statement statement = conn.createStatement(); | ||
|
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.