This application is the result of doing reversing engineering to the Contest Management System(CMS) and provides a backend layer for controlling the register process of new users.
- mvn install
- mvn package
- mvn spring-boot:run
It's necessary to add some properties to the configuration file before of running the application, these properties are:
- Cookie secret key
- CMS domain
- CMS port
- Database connection
- Message broker
- OAuth
- Proxy considerations
The file is locate in src/main/resources.
The cookie secret key is a string characters which is used to encrypt a user password. It's mandatory to put the same string that was added in CMS configuration file.
cookie-secret: 8e045a51e4b102ea803c06f92841a1fb
The domain name is necessary to redirect a login request to CMS home page.
cms-domain: 192.168.187.134
A port number is required only if the CMS Server is reached by IP route instead of using a sub-domain
cms-port: 8888
To set up a connection to the CMS a database connection is mandatory. It's described into the application properties file.
--- spring: profiles: development db-one: datasource: url: jdbc:postgresql://192.168.187.133:5432/cmsdb username: postgres password: postgres1
As same as the database the RabbitQM connection depends on multiple fields.
---- spring: rabbitmq: host: 192.168.187.133 port: 5672 username: rabbit password: rabbit1
CMS-users-admin uses OAuth protocol to allow authenticated access to its resources by establishing a connection to a specific social network provider.
--- security: google: client: clientId: clientSecret: ... ... github: client: clientId: clientSecret:
If you are using a http-proxy in between to redirect all the HTTP requests to CMS-users-admin make sure to include the parameter authorization in each request.
Authorization: Bearer eyJh123tokentestAs it is known spring boot let externalize the application configuration, in order to do that parameters can be injected using the following formats.
java -jar cmsusers.jar --spring.db-one.datasource.username=custom_user
docker run -p 8081:8081 -e SPRING_DB_ONE_DATASOURCE_USERNAME='custom_user' cmsorbits/cms-users:1.1