Skip to content

Commit 8759cc1

Browse files
committed
added tokensmith basic config file; update env file
Signed-off-by: Travis Cotton <trcotton@lanl.gov>
1 parent e44203b commit 8759cc1

3 files changed

Lines changed: 56 additions & 0 deletions

File tree

systemd/configs/openchami.env

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,15 @@ SMD_DBUSER=smd-user
3636
SMD_DBOPTS=sslmode=disable
3737
SMD_JWKS_URL=http://opaal:3333/keys
3838

39+
# Environemnt Variables
40+
TOKENSMITH_ISSUER=https://tokensmith.openchami.dev
41+
TOKENSMITH_CLUSTER_ID=demo-cluster
42+
TOKENSMITH_OPENCHAMI_ID=demo-openchami
43+
TOKENSMITH_CONFIG=/tokensmith/config.json
44+
TOKENSMITH_KEY_DIR=/tmp/tokensmith/keys
45+
TOKENSMITH_OIDC_PROVIDER=http://hydra:4444
46+
TOKENSMITH_PORT=8080
47+
3948
# Environemnt Variables
4049
STEPPATH=/home/step
4150
DOCKER_STEPCA_INIT_NAME=OpenCHAMI

systemd/configs/tokensmith.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"groupScopes": {
3+
"admin": [
4+
"admin",
5+
"write",
6+
"read"
7+
],
8+
"operator": [
9+
"write",
10+
"read"
11+
],
12+
"user": [
13+
"read"
14+
],
15+
"viewer": [
16+
"read"
17+
]
18+
}
19+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
[Unit]
2+
Description=The tokensmith container
3+
Wants=hydra-gen-jwks.service
4+
After=hydra-gen-jwks.service
5+
PartOf=openchami.target
6+
7+
[Container]
8+
ContainerName=tokensmith
9+
HostName=tokensmith
10+
Image=ghcr.io/openchami/tokensmith:pr-13
11+
EnvironmentFile=/etc/openchami/configs/openchami.env
12+
13+
# Volumes
14+
Volume=/etc/openchami/tokensmith.json:/tokensmith/config.json:Z
15+
16+
# Networks for the Container to use
17+
Network=openchami-internal.network
18+
Network=openchami-jwt-internal.network
19+
20+
# Extra hosts
21+
PodmanArgs=--add-host='demo.openchami.cluster:172.16.0.254'
22+
# Proxy settings
23+
PodmanArgs=--http-proxy=false
24+
25+
[Service]
26+
Restart=always
27+
# Run commands after container starts
28+
ExecStartPost=sleep 10s

0 commit comments

Comments
 (0)