@@ -23,112 +23,58 @@ kubectl apply -f clusterissuer.yaml
2323
2424``` bash
2525cd zotprime-k8s/microk8s/helm-chart
26- cp values-example.yaml values.yaml
2726```
2827
29- ### 2. Configure TLS
28+ ### 2. Generate Secrets
3029
31- Edit ` values.yaml ` :
32-
33- ``` yaml
34- tls :
35- enabled : false # Set true for HTTPS
36- ` ` `
37-
38- ### 3. Configure Credentials
39-
40- Generate auth secrets:
30+ ** Automated (Recommended):**
4131
32+ Linux/Mac:
4233``` bash
43- # Auth salt
44- openssl rand -hex 16 | base64
45-
46- # API super token hash
47- php -r "echo password_hash('YOUR_TOKEN', PASSWORD_BCRYPT);" | base64
34+ cd ../scripts
35+ ./generate-secrets.py
4836```
4937
50- Generate base64-encoded secrets:
51-
52- ** Linux/Mac:**
38+ Windows (WSL):
5339``` bash
54- echo " MINIO_ROOT_PASSWORD=your_password " | base64
55- printf " MARIADB_ROOT_PASSWORD=root_pass\nMARIADB_PASSWORD=user_pass " | base64
40+ cd ../scripts
41+ wsl ./generate-secrets.py
5642```
5743
58- ** Windows PowerShell:**
59- ``` powershell
60- [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes("MINIO_ROOT_PASSWORD=your_password"))
61- [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes("MARIADB_ROOT_PASSWORD=root_pass`nMARIADB_PASSWORD=user_pass"))
62- ```
63-
64- Edit ` values.yaml ` :
65-
66- ``` yaml
67- authSecret :
68- authSalt : " <base64_output>"
69- apiSuperTokenHash : " <base64_output>"
70-
71- minioSecret :
72- minioRootPassword : " <base64_password>"
73-
74- dbSecret :
75- mysqlRootPassword : " <base64_password>"
76- mysqlPassword : " <base64_password>"
77-
78- dbConfig :
79- mariadbUser : your_db_user
80- mariadbDatabasename : your_db_name
81-
82- zoteroAdmin :
83- adminUsername : admin
84- adminPassword : admin
85- adminEmail : admin@example.com
86- ` ` `
87-
88- ### 3a. Configure Basic Auth
89-
90- Protect PHPMyAdmin and MinIO web console with HTTP Basic Authentication. This adds a second layer of security at the ingress level before reaching the application's own authentication.
91-
92- **Install htpasswd:**
93-
94- Linux:
44+ Requires: ` python3-yaml ` package
9545``` bash
96- sudo apt install apache2-utils
46+ sudo apt install python3-yaml
9747```
9848
99- Mac:
100- ``` bash
101- brew install httpd
102- ```
49+ ** Manual:**
10350
104- Windows (WSL) :
51+ Copy template and edit all empty ` "" ` fields :
10552``` bash
106- wsl --install
107- wsl sudo apt install apache2-utils
53+ cp values-example.yaml values.yaml
10854```
10955
110- ** Generate password hash:**
56+ Populate in ` values.yaml ` :
57+ - ` authSecret ` (authSalt, apiSuperToken, apiSuperTokenHash, appKey)
58+ - ` webAdminConfig ` (username)
59+ - ` webAdminSecret ` (password)
60+ - ` minioSecret ` (secretTxt)
61+ - ` blobSecret ` (awsAccessKeyId, awsSecretAccessKey)
62+ - ` dbSecret ` (mariadbRootPassword, mariadbPassword)
63+ - ` zoteroSecret ` (adminPassword)
64+ - ` webPortalSecret ` (sessionSecret)
65+ - ` basicAuth ` (htpasswd, if enabled)
11166
112- Linux/Mac:
113- ``` bash
114- htpasswd -nb admin yourpassword | base64
115- ```
67+ See ` values-example.yaml ` comments for generation commands.
11668
117- Windows (WSL):
118- ``` bash
119- wsl htpasswd -nb admin yourpassword | base64
120- ```
69+ ### 3. Configure TLS
12170
122- ** Edit ` values.yaml ` :**
71+ Edit ` values.yaml ` :
12372
12473``` yaml
125- basicAuth :
126- enabled : true
127- htpasswd : " <base64_output>"
74+ tls :
75+ enabled : false # Set true for HTTPS
12876` ` `
12977
130- Users will authenticate twice: first at ingress (basic auth), then at application login (PHPMyAdmin/MinIO credentials).
131-
13278### 4. Configure Domains
13379
13480Edit ` values.yaml` - replace all `yoursub*.yourdomain.tld`:
0 commit comments