Skip to content

Commit

Permalink
ID-4235: Redis config environment specific.
Browse files Browse the repository at this point in the history
  • Loading branch information
oyri committed May 7, 2024
1 parent 371ad02 commit 68f2b72
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 16 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# eu-eidas-proxy
# eidas-generic-proxy
Norwegian generic eIDAS-proxy build from eIDAS source.

See these documents in https://ec.europa.eu/digital-building-blocks/sites/display/DIGITAL/eIDAS-Node+version+2.7.1:
Expand All @@ -7,18 +7,19 @@ See these documents in https://ec.europa.eu/digital-building-blocks/sites/displa
* eIDAS-Node Installation and Configuration Guide v2.7.1.pdf


### Run eu-eidas-proxy as docker-compose on your machine for local testing
### Run eidas-generic-proxy as docker-compose on your machine for local testing

Add the following to your /etc/hosts file:
```
# eIDAS local dev
127.0.0.1 eu-eidas-proxy
127.0.0.1 eidas-generic-proxy
```

Start docker containers:
```
docker-compose -f docker-compose.yaml up --build
docker-compose --env-file docker.env up --build
```

### Run eu-eidas-proxy in test/production environment
Systest: eu-eidas-proxy.idporten.dev
### Run eidas-generic-proxy in test/production environment
Systest: eu-eidas-proxy.idporten.dev , but will be moved to proxy.eidasnode.dev soon.
1 change: 1 addition & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ services:
entrypoint: "/bin/bash -c"
command:
- |
export CATALINA_OPTS="$CATALINA_OPTS -DredisPassword=${REDIS_PASSWORD} -DredisPort=${REDIS_PORT} -DredisHost=${REDIS_HOST} -DlightTokenProxyserviceRequestSecret=${LIGHT_TOKEN_PROXYSERVICE_REQUEST_SECRET} -DlightTokenProxyserviceResponseSecret=${LIGHT_TOKEN_PROXYSERVICE_RESPONSE_SECRET}"
cd /usr/local/tomcat
./bin/catalina.sh run
Expand Down
4 changes: 4 additions & 0 deletions docker.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
REDIS_HOST=redis
REDIS_PORT=6379
LIGHT_TOKEN_PROXYSERVICE_REQUEST_SECRET=mySecretProxyserviceRequest
LIGHT_TOKEN_PROXYSERVICE_RESPONSE_SECRET=mySecretProxyserviceResponse
10 changes: 5 additions & 5 deletions docker/proxy/config/redis/redis.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
<!--Redis config -->
<entry key="redis.host">redis</entry>
<entry key="redis.port">6379</entry>
<entry key="redis.password"></entry>
<entry key="redis.sentinelNodes"></entry>
<entry key="redis.sentinelMaster"></entry>
<entry key="redis.host">${redisHost}</entry>
<entry key="redis.port">${redisPort}</entry>
<entry key="redis.password">${redisPassword}</entry>
<entry key="redis.sentinelNodes">${redisSentinelNodes}</entry>
<entry key="redis.sentinelMaster">${redisSentinelMaster}</entry>
</properties>
4 changes: 2 additions & 2 deletions docker/proxy/config/specificCommunicationDefinition.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

<!--secrets and algorithms for lightRequest token-->
<entry key="lightToken.proxyservice.request.issuer.name">specificCommunicationDefinitionProxyserviceRequest</entry>
<entry key="lightToken.proxyservice.request.secret">mySecretProxyserviceRequest</entry>
<entry key="lightToken.proxyservice.request.secret">${lightTokenProxyserviceRequestSecret}</entry>
<entry key="lightToken.proxyservice.request.algorithm">SHA-256</entry>

<!-- eIDAS-Node messages logging: Point 5 -->
Expand All @@ -35,7 +35,7 @@

<!--secrets and algorithms for lightResponse token-->
<entry key="lightToken.proxyservice.response.issuer.name">specificCommunicationDefinitionProxyserviceResponse</entry>
<entry key="lightToken.proxyservice.response.secret">mySecretProxyserviceResponse</entry>
<entry key="lightToken.proxyservice.response.secret">${lightTokenProxyserviceResponseSecret}</entry>
<entry key="lightToken.proxyservice.response.algorithm">SHA-256</entry>

<!--The value of incoming Light Response maximum number characters allowed-->
Expand Down
6 changes: 2 additions & 4 deletions docker/proxy/tomcat-setenv.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@

# tomcat options jvm
export CATALINA_OPTS="-Xms512m -Xmx1024m"

# Tomcat options jvm
export CATALINA_OPTS="$CATALINA_OPTS -Xms512m -Xmx1024m"

# bouncycastle.
export JAVA_OPTS="$JAVA_OPTS -Djava.security.properties=/opt/java/openjdk/conf/security/java_bc.security"
Expand Down

0 comments on commit 68f2b72

Please sign in to comment.