Compare commits

...

2 commits

Author SHA1 Message Date
f9e0465ae6 Update updater 2024-12-08 10:46:35 +01:00
83f531e680 Be more verbose 2024-12-08 10:45:18 +01:00
4 changed files with 7 additions and 4 deletions

View file

@ -4,8 +4,8 @@ name: basic-web-app
PullName: basic-app-puller PullName: basic-app-puller
description: A basic Helm chart to have PHP webapps in Kubernetes. It supports webhook for pulling from gitea description: A basic Helm chart to have PHP webapps in Kubernetes. It supports webhook for pulling from gitea
type: application type: application
version: 2.2.2 version: 2.2.3
appVersion: "2.2.2" appVersion: "2.2.3"
dependencies: dependencies:
- name: postgresql - name: postgresql

View file

@ -1,2 +1,2 @@
podman build -t glvx/web-updater . podman build -t glvx/web-updater .
podman push glvx/web-updater docker://docker.io/glvx/web-updater:241204-2 podman push glvx/web-updater docker://docker.io/glvx/web-updater:241208-0

View file

@ -165,6 +165,7 @@ def require_basic_auth(f):
try: try:
auth_type, auth_string = auth_header.split(' ', 1) auth_type, auth_string = auth_header.split(' ', 1)
if auth_type.lower() != 'basic': if auth_type.lower() != 'basic':
logger.info("Invalid authentication header '{auth_type}'")
return authenticate() return authenticate()
# Decode base64 credentials # Decode base64 credentials
@ -172,9 +173,11 @@ def require_basic_auth(f):
username, password = credentials.split(':', 1) username, password = credentials.split(':', 1)
if not (username == API_USERNAME and password == API_PASSWORD): if not (username == API_USERNAME and password == API_PASSWORD):
logger.info(f"Invalid authentication with username='{username}' and password='{password}'")
return authenticate() return authenticate()
except (ValueError, base64.binascii.Error): except (ValueError, base64.binascii.Error):
logger.info("Invalid authentication encoding")
return authenticate() return authenticate()
return f(*args, **kwargs) return f(*args, **kwargs)

View file

@ -20,7 +20,7 @@ updater:
image: image:
repository: glvx/web-updater repository: glvx/web-updater
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
tag: "241204-2" tag: "241208-0"
url: "https://git.aquila-consortium.org/guilhem_lavaux/gl-website-deployer" url: "https://git.aquila-consortium.org/guilhem_lavaux/gl-website-deployer"
ssh: ssh:
enabled: false enabled: false