https://github.com/entando/connection-config-connector
https://github.com/entando/connection-config-connector
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/entando/connection-config-connector
- Owner: entando
- License: lgpl-3.0
- Created: 2020-10-08T14:46:03.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-10-08T14:46:44.000Z (over 5 years ago)
- Last Synced: 2025-02-01T03:28:00.756Z (over 1 year ago)
- Language: Java
- Size: 39.1 KB
- Stars: 0
- Watchers: 10
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Entando Connection Config Connector
[](https://jenkins.entandocloud.com/job/de-connection-config-connector-master/)
[](https://coveralls.io/github/entando/connection-config-connector?branch=master)
This library is used to integrate with the Entando Connection Config Sidecar. The sidecar exposes an API to handle
connection configuration and this library make it possible to integrate with the sidecar without the need to
implement the communication to the service.
## Install
Add the following dependency to your project:
```xml
org.entando
connection-config-connector
0.0.1-SNAPSHOT
```
The library includes the configuration class `org.entando.connectionconfigconnector.config.ConnectionConfigConfiguration`
and you need to make sure it will be loaded. One way to do that is by using the `@Import` Spring annotation:
```java
@SpringBootApplication
@Import(ConnectionConfigConfiguration.class)
public class DemoApplication {
public static void main(String[] args) {
SpringApplication.run(DemoApplication.class, args);
}
}
```
## Security Level
This library has two modes or security levels: STRICT and LENIENT. You can choose the security level using the spring
property `entando.plugin.security.level`.
### STRICT
This is the default security level. On this level, the library does not communicate with the sidecar. Hence, the sidecar
does not need to be deployed when using this level.
On the Strict security level, only read operations can be performed and the exception `ConnectionConfigException` is
raised when trying to perform other operations (add, delete, edit).
When running on Strict security level, connection config is read from the file system and the root directory is defined
by the spring property `entando.connections.root`, which has the default value `/etc/entando/connectionconfigs`. Since
only read operations are allowed on the strict mode, the files with the configurations should be included manually.
Inside the root directory, there should be one subdirectory for each connection config and each subdirectory must have
a file named `config.yaml`. The yaml file should contain attributes matching the class `ConnectionConfig.java`:
```yaml
name:
url:
username:
password:
serviceType:
properties:
property1: value1
property2: value2
```
### LENIENT
On this security level the library communicate with the sidecar, so the sidecar needs to be deployed and reachable
through localhost.
When using Lenient security level, all operations are supported and translated to HTTP requests on localhost on
the port number defined by the Spring property `plugin.sidecar.port`, which has the default value 8084. This is where
the sidecar must be running.
To get more information regarding the sidecar, please check its repository:
https://github.com/entando/entando-plugin-sidecar