Skip to content

angelok1/OpenID-Connect-Java-Spring-Server

 
 

Repository files navigation

MITREid Connect


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

The mckesson-openid-connect-webapp is an overlay project for G2.

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:

Maven Central Travis CI Codecov

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.

OpenID Certified

More information about the project can be found:

The authors and key contributors of the project include:

Copyright ©2017, MIT Internet Trust Consortium. Licensed under the Apache 2.0 license, for details see LICENSE.txt.

About

An OpenID Connect reference implementation in Java on the Spring platform.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 62.6%
  • JavaScript 26.0%
  • HTML 5.5%
  • CSS 5.0%
  • PLSQL 0.9%