This repo is a fork from the MITREid OpenID Connect project.
It includes SMART OAUTH functionality as well as Mckesson-centric implementations for Oracle 11g.
If you want to try the server on HSQL, you can run the openid-connect-server-webapp project by doing the following:
$ mvn package <-- at the parent level
$ mvn clean deploy <-- at the parent level
$ cd openid-connect-server-webapp
$ mvn jetty:run
To use it, do the following:
First, make sure the Oracle connection info, username, and password are correct in [your path]/OpenID-Connect-Java-Spring-Server/emr.properties
.
OAUTH_JDBC_URL=[your server]:1521/[your instance]
OAUTH_USER_NAME=[username, "oauth" by default]
OAUTH_PASSWORD=[password, "test" by default]
Second, be sure to set the environment variable LYNXEMR_PROPERTY_FILE
to the location of that file.
Database connection settings are used in this file: mckesson-openid-connect-webapp/src/main/webapp/WEB-INF/data-context.xml
If you need to create a new local test database in a running instance of Oracle, uncomment the lines at the bottom of data-context.xml
that run the seed scripts. You may want to run the mckesson-openid-connect-webapp/src/main/resources/db/oracle11g/create_db-user
file prior to running the seeds if you need the user and schema created. Be sure to comment those back out next time you run this. Another option would be to run the scripts manually.
<jdbc:initialize-database data-source="dataSource">
<jdbc:script location="classpath:/db/oracle/oracle_database_tables.sql"/>
<jdbc:script location="classpath:/db/oracle/security-schema_oracle.sql"/>
<jdbc:script location="classpath:/db/oracle/loading_temp_tables_oracle.sql"/>
<jdbc:script location="classpath:/db/oracle/users_oracle.sql"/>
<jdbc:script location="classpath:/db/oracle/clients_oracle.sql"/>
<jdbc:script location="classpath:/db/oracle/scopes_oracle11g.sql"/>
</jdbc:initialize-database>
If you're testing locally, you may want to disable the password hash since the above scripts don't hash the password. You can do that by disabling passwordEncoder
in mckesson-openid-connect-webapp/src/main/webapp/WEB-INF/user-context.xml
.
<security:authentication-manager id="authenticationManager">
<security:authentication-provider>
<!--<security:password-encoder ref="passwordEncoder"/>-->
<security:jdbc-user-service data-source-ref="dataSource" />
</security:authentication-provider>
</security:authentication-manager>
Lastly, build and run the server.
$ mvn package <-- at the parent level
$ mvn clean deploy <-- at the parent level
$ cd mckesson-openid-connect-webapp
$ mvn clean package
$ mvn jetty:run
The server will be available at http://localhost:8080/openid-connect-server-webapp
Contributors to the McKesson version:
This project contains a certified OpenID Connect reference implementation in Java on the Spring platform, including a functioning server library, deployable server package, client (RP) library, and general utility libraries. The server can be used as an OpenID Connect Identity Provider as well as a general-purpose OAuth 2.0 Authorization Server.
More information about the project can be found:
- The project homepage on GitHub (with related projects)
- Full documentation
- Documentation for the Maven project and Java API
- Issue tracker (for bug reports and support requests)
- The mailing list for the project can be found at
mitreid-connect@mit.edu
, with archives available online.
The authors and key contributors of the project include:
- Justin Richer
- Amanda Anganes
- Michael Jett
- Michael Walsh
- Steve Moore
- Mike Derryberry
- William Kim
- Mark Janssen
Copyright ©2017, MIT Internet Trust Consortium. Licensed under the Apache 2.0 license, for details see LICENSE.txt
.