When this library is added to a project it allows for various IU customized services.
Add the following as a dependency in your pom.xml
<dependency>
<groupId>edu.iu.uits.lms</groupId>
<artifactId>lms-canvas-iu-custom-services</artifactId>
<version><!-- latest version --></version>
</dependency>
You can find the latest version in Maven Central.
Add to any configuration class, or even the main application class @EnableIuOnlyClient
.
Once that has been done, you can autowire in and use the various services:
@Autowired
private FeatureAccessServiceImpl featureAccessService;
@Autowired
private SisServiceImpl sisService;
If choosing to use properties files for the configuration values, the default location is /usr/src/app/config
, but
that can be overridden by setting the app.fullFilePath
value via system property or environment variable.
The following properties need to be set to configure the communication with a database. They can be set in a security.properties file, or overridden as environment variables.
Property | Description |
---|---|
lms.db.user |
Username used to access the database |
lms.db.url |
JDBC URL of the database. Will have the form jdbc:<dbtype>://<host>:<port>/<database> |
lms.db.password |
Password for the user accessing the database |
lms.db.poolType |
Fully qualified name of the connection pool implementation to use. By default, it is auto-detected from the classpath. |
The following properties need to be set to configure the communication with Denodo.
They can be set in a security.properties file, or overridden as environment variables.
Additionally, you will need to enable it by including the value denodo
into the SPRING_PROFILES_ACTIVE
environment
variable. Be aware that if the tool requires multiple values, that there could be more than one profile value in there.
Property | Default Value | Description |
---|---|---|
denodo.db.driverClass |
Driver class for denodo database connections | |
denodo.db.url |
JDBC URL for connecting to denodo | |
denodo.db.user |
Denodo username | |
denodo.db.password |
Denodo password |
The following properties need to be set to configure the communication with Derdack.
They can be set in a security.properties file, or overridden as environment variables.
Additionally, you will need to enable it by including the value derdack
into the SPRING_PROFILES_ACTIVE
environment
variable. Be aware that if the tool requires multiple values, that there could be more than one profile value in there.
Property | Default Value | Description |
---|---|---|
derdack.rest.baseUrl |
Base URL for Derdack API | |
derdack.rest.apiKey |
Derdack API key | |
derdack.rest.team |
Team for Derdack requests | |
derdack.recipientEmail |
[email protected] | Email for Derdack notifications |
If you would like to expose the REST endpoints in a tool, you will need to enable them by including the value
iucustomrest
into the SPRING_PROFILES_ACTIVE
environment variable. Be aware that if the tool requires multiple values,
that there could be more than one profile value in there.
In order to get access to the endpoints, you'd need to configure an OAuth2 server. Once setup, the user(s) needing access
would have to be granted the iusvcs:read
and/or the iusvcs:write
scopes as appropriate. Grant type should be set as Authorization Code
.
See the wiki for details.
To generate the REST docs (asciidoc) that live in the github wiki, take the following steps:
- Enable the rest endpoints and swagger in the tool of choice and start it up
- Note the api docs url. Should be something like http://localhost:8080/api/iu/v3/api-docs
- Download the openapi-generator from here
- Run the following (:warning: Command could be slightly different based on your OS and install method):
openapi-generator generate -g asciidoc -i <url_from_above_step>
- Take the generated output and update the wiki page (:warning: Some hand editing may be required)