Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotfix/ changed alpine to debian in script #46

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 18 additions & 16 deletions charts/dome-issuer-keycloak/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,33 +30,35 @@ spec:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
initContainers:
- name: certificate-init
image: alpine:3.18
image: openjdk:11-jre-slim
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no fem servir jre

command: ["/bin/sh", "-c"]
args:
- |
#!/bin/sh

# Install packages
apk update
apk add --no-cache curl openjdk11-jre openssl
set -e

# Create a temporal storage
# Instalar paquetes necesarios
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

En anglès, please :)

apt-get update
apt-get install -y --no-install-recommends curl openssl

# Crear almacenamiento temporal
echo "Creating temporal storage..."
mkdir -p /opt/keycloak/conf/tmp
cd /opt/keycloak/conf/tmp

# Delete previous data: truststore, certificates and eu-lotl.xml
# Eliminar datos anteriores: truststore, certificados y eu-lotl.xml
echo "Deleting previous data: truststore, certificates and eu-lotl.xml"
rm -f cert_* truststore.jks eu-lotl.xml

# Create an empty truststore.jks if it doesn't exist
# Crear un truststore.jks vacío si no existe
if [ ! -f /opt/keycloak/conf/truststore.jks ]; then
echo "Creating an empty truststore.jks"
keytool -genkey -alias tempkey -keystore /opt/keycloak/conf/truststore.jks -storepass pempas -keypass pempas -dname "CN=Temp, OU=Temp, O=Temp, L=Temp, ST=Temp, C=US"
keytool -delete -alias tempkey -keystore /opt/keycloak/conf/truststore.jks -storepass pempas
fi

# Download eu-lotl.xml file
# Descargar el archivo eu-lotl.xml
echo "Downloading eu-lotl.xml file..."
curl -s https://sedediatid.mineco.gob.es/Prestadores/TSL/TSL.xml -o eu-lotl.xml

Expand All @@ -65,15 +67,15 @@ spec:
exit 1
fi

# Validate that the file was downloaded successfully
# Validar que el archivo se descargó correctamente
if [ ! -f eu-lotl.xml ]; then
echo "eu-lotl.xml not found after download."
exit 1
fi

echo "eu-lotl.xml downloaded successfully."

# Extract certificates from eu-lotl.xml
# Extraer certificados del archivo eu-lotl.xml
certificates=$(grep -o '<X509Certificate>[^<]*</X509Certificate>' eu-lotl.xml | sed -e 's/<X509Certificate>//g' -e 's/<\/X509Certificate>//g')
count=1

Expand All @@ -88,23 +90,23 @@ spec:
echo "-----END CERTIFICATE-----" >> "$file"
fi

# Validate that the PEM file was created successfully
# Validar que el archivo PEM se creó correctamente
if [ ! -f "$file" ]; then
echo "Failed to create $file"
exit 1
fi

# Validate that the PEM file is not empty
# Validar que el archivo PEM no esté vacío
echo "Content of $file:"
cat "$file"

# Generate a DER file from the PEM file
# Generar un archivo DER desde el archivo PEM
if ! openssl x509 -in "$file" -out "cert_$count.der" -outform DER; then
echo "Failed to create cert_$count.der"
exit 1
fi

# Import the DER file to the truststore
# Importar el archivo DER al truststore
if ! echo "yes" | keytool -import -alias "cert_$count" -file "cert_$count.der" -keystore /opt/keycloak/conf/truststore.jks -storepass pempas; then
echo "Failed to import cert_$count.der to truststore.jks"
exit 1
Expand All @@ -115,11 +117,11 @@ spec:

echo "Certificates imported to truststore."

# List the content of the truststore
# Listar el contenido del truststore
echo "Truststore content:"
keytool -list -keystore /opt/keycloak/conf/truststore.jks -storepass pempas

# Clean up temporary files
# Limpiar archivos temporales
echo "Cleaning up temporary files."
rm -f cert_* eu-lotl.xml

Expand Down
Binary file modified desmos-0.7.0.tgz
Binary file not shown.
Binary file modified dome-issuer-keycloak-1.0.0.tgz
Binary file not shown.
Binary file modified dome-wallet-keycloak-0.1.0.tgz
Binary file not shown.
Binary file modified dome-wallet-ui-0.1.0.tgz
Binary file not shown.
46 changes: 23 additions & 23 deletions index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ entries:
desmos:
- apiVersion: v2
appVersion: v0.7.0
created: "2024-06-11T11:53:14.226155778Z"
created: "2024-06-11T12:34:04.534878878Z"
description: A Helm chart for Kubernetes
digest: 73626b02d5a6c1cf09b90b17308e69b6db13300471deb10c75002ab49289c61f
digest: 592f429baa0499220f4955e2837ab746a4e7c40e3322f37a124737294dca5c51
maintainers:
- email: domesupport@in2.es
name: IN2 Team
Expand All @@ -19,9 +19,9 @@ entries:
dome-issuer-keycloak:
- apiVersion: v2
appVersion: v1.1.0
created: "2024-06-11T11:53:14.228900992Z"
created: "2024-06-11T12:34:04.537408991Z"
description: A Helm chart for Kubernetes
digest: b9f729c0a9edb3f6060c72591effe74e79868bcf894b458b94fcffb67c084291
digest: 82ee181e1be951525c62e5fc3e5f2629387d7a827b17b56c4125a64161265ee6
maintainers:
- email: domesupport@in2.es
name: IN2 Team
Expand All @@ -35,9 +35,9 @@ entries:
dome-wallet-keycloak:
- apiVersion: v2
appVersion: v1.0.0
created: "2024-06-11T11:53:14.229330063Z"
created: "2024-06-11T12:34:04.537867596Z"
description: A Helm chart for Kubernetes
digest: 950bea3c1559077bc6c29e4d945a91e71fe33b62487876255eef15610b218482
digest: 1dff7a5ffaf717c3381ceb5ba0746452db86723356176473757d43e3ab295b5c
maintainers:
- email: domesupport@in2.es
name: IN2 Team
Expand All @@ -51,9 +51,9 @@ entries:
dome-wallet-ui:
- apiVersion: v2
appVersion: v1.2.0
created: "2024-06-11T11:53:14.229748454Z"
created: "2024-06-11T12:34:04.538287518Z"
description: A Helm chart for Kubernetes
digest: 81c87e8f2156155211884611aeeb7db60f946cb74efaf361bb8cd38e7c0fff45
digest: ef86f764cfb75eba0fd544bba4ba590923a6fb9a04e7f0f762d40f254e064e29
maintainers:
- email: domesupport@in2.es
name: IN2 Team
Expand All @@ -67,9 +67,9 @@ entries:
issuer-api:
- apiVersion: v2
appVersion: v0.8.0
created: "2024-06-11T11:53:14.231196046Z"
created: "2024-06-11T12:34:04.540023383Z"
description: A Helm chart for Kubernetes
digest: 79dc1afae2cc84b6e177675a0aa7b597580aad8634c21237ba6cf5c8b31afbbc
digest: e8cde53bc9e2d77f42fa10031c8f1043cfd44d5af493fdd69e045b5a21858b1b
maintainers:
- email: domesupport@in2.es
name: IN2 Team
Expand All @@ -82,7 +82,7 @@ entries:
version: 1.0.0
- apiVersion: v2
appVersion: v0.8.0
created: "2024-06-11T11:53:14.230692666Z"
created: "2024-06-11T12:34:04.539504355Z"
description: A Helm chart for Kubernetes
digest: b21630517356d28e7c6cccac3ed5a966a3d612ac5ce88cf02e4f6fbe521bff66
maintainers:
Expand All @@ -97,7 +97,7 @@ entries:
version: 0.8.0
- apiVersion: v2
appVersion: v0.7.0
created: "2024-06-11T11:53:14.230235563Z"
created: "2024-06-11T12:34:04.538786207Z"
description: A Helm chart for Kubernetes
digest: 852121020fe5499365b5c53360b44d2a36fe9bd5849af66382e52526f16fba61
maintainers:
Expand All @@ -113,7 +113,7 @@ entries:
issuer-keycloak-plugin:
- apiVersion: v2
appVersion: v1.1.0
created: "2024-06-11T11:53:14.231705267Z"
created: "2024-06-11T12:34:04.540542479Z"
description: A Helm chart for Kubernetes
digest: 8440d394b07c87667b182b2ee9a22b37a8c7ac7d9b48ef51e7b343599838d8bf
maintainers:
Expand All @@ -129,9 +129,9 @@ entries:
issuer-ui:
- apiVersion: v2
appVersion: v0.6.0
created: "2024-06-11T11:53:14.232389814Z"
created: "2024-06-11T12:34:04.541224981Z"
description: A Helm chart for Kubernetes
digest: c878e94a064b0021c9ff77500190f25be8a6bb3efdaa50d8289286da16c735e3
digest: 5809a3ff534a19bdae235c58afcf2cc8441479aff2a5634adb378e5dd836bdac
maintainers:
- email: domesupport@in2.es
name: IN2 Team
Expand All @@ -144,7 +144,7 @@ entries:
version: 1.0.0
- apiVersion: v2
appVersion: v0.6.0
created: "2024-06-11T11:53:14.23205015Z"
created: "2024-06-11T12:34:04.540883425Z"
description: A Helm chart for Kubernetes
digest: 007d38ebf7168feee4a94e4e5e3338cab5328b15602a7fa6bfcafa73de7c358f
maintainers:
Expand All @@ -160,7 +160,7 @@ entries:
wallet:
- apiVersion: v2
appVersion: v0.0.1
created: "2024-06-11T11:53:14.23858908Z"
created: "2024-06-11T12:34:04.546980955Z"
dependencies:
- condition: wallet-api.enabled
name: wallet-api
Expand Down Expand Up @@ -190,7 +190,7 @@ entries:
repository: oci://registry-1.docker.io/bitnamicharts
version: 13.1.5
description: Umbrella Helm chart for the Wallet
digest: a6a622c60e8cf81d783c36dd798bcac79d12105ab89cbae8c2d7658ad8ab1f41
digest: 4d5de5cca64bd52f6538b2bc73848172048e971dc67997179df8b1119e48468d
name: wallet
type: application
urls:
Expand All @@ -199,9 +199,9 @@ entries:
wallet-api:
- apiVersion: v2
appVersion: v1.2.0
created: "2024-06-11T11:53:14.239126243Z"
created: "2024-06-11T12:34:04.547461951Z"
description: A Helm chart for Kubernetes
digest: 75f043e5e7ce9287afccfc9193053b9759372991d7d7ebbde8e687101a074d87
digest: b37427b668482e481655db0fe4829306e7e73d9a874ad7972bc80a8417dbf04b
maintainers:
- email: domesupport@in2.es
name: IN2 Team
Expand All @@ -215,7 +215,7 @@ entries:
wallet-driving-application:
- apiVersion: v2
appVersion: v1.0.0
created: "2024-06-11T11:53:14.239401697Z"
created: "2024-06-11T12:34:04.547737294Z"
description: A Helm chart for Kubernetes
digest: 0b1a7ab828c55ac23374f433da4dc76bff007d1a7b9ec39b26f4b86e4e31fdd3
maintainers:
Expand All @@ -231,7 +231,7 @@ entries:
wallet-server:
- apiVersion: v2
appVersion: v1.0.0
created: "2024-06-11T11:53:14.239906439Z"
created: "2024-06-11T12:34:04.548237115Z"
description: A Helm chart for Kubernetes
digest: b22dfbd82a9672ba6daabc09fe540b908d9279f5a43fcb79d4a0f6ef383285fa
maintainers:
Expand All @@ -244,4 +244,4 @@ entries:
urls:
- https://in2workspace.github.io/helm-charts/wallet-server-0.1.0.tgz
version: 0.1.0
generated: "2024-06-11T11:53:14.225475268Z"
generated: "2024-06-11T12:34:04.53421473Z"
Binary file modified issuer-api-1.0.0.tgz
Binary file not shown.
Binary file modified issuer-ui-1.0.0.tgz
Binary file not shown.
Binary file modified wallet-0.1.0.tgz
Binary file not shown.
Binary file modified wallet-api-0.1.0.tgz
Binary file not shown.