Skip to content

Commit 60055dd

Browse files
author
lijianguo
committed
chore(chart): modify secret
1 parent 948baa2 commit 60055dd

5 files changed

Lines changed: 13 additions & 14 deletions

File tree

charts/passport/templates/_helpers.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ env:
1717
- name: "TZ"
1818
value: {{ .Values.time_zone | default "UTC" | quote }}
1919
- name: "DRYCC_CONTROLLER_DOMAIN"
20-
value: drycc.{{ .Values.global.platform_domain }}
20+
value: http://drycc.{{ .Values.global.platform_domain }}
2121
- name: SOCIAL_AUTH_DRYCC_CONTROLLER_KEY
2222
valueFrom:
2323
secretKeyRef:
@@ -36,7 +36,7 @@ env:
3636
value: {{ .Values.admin_username | default "admin" | quote }}
3737
- name: ADMIN_PASSWORD
3838
value: {{ .Values.admin_password | default "admin" | quote }}
39-
- name: ADMIN_EMAIN
39+
- name: ADMIN_EMAIL
4040
value: {{ .Values.admin_email | default "admin@email.com" | quote }}
4141
{{- if (.Values.database_url) }}
4242
- name: DRYCC_DATABASE_URL

charts/passport/templates/passport-secret-creds.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ data:
1212
database-url: {{ .Values.database_url | b64enc }}
1313
{{- end }}
1414
django-secret-key: {{ randAscii 64 | b64enc }}
15-
social-auth-drycc-controller-key: {{ randAscii 40 | b64enc }}
16-
social-auth-drycc-controller-secret: {{ randAscii 64 | b64enc }}
15+
social-auth-drycc-controller-key: {{ randAlphaNum 40 | b64enc }}
16+
social-auth-drycc-controller-secret: {{ randAlphaNum 64 | b64enc }}
1717
oidc-rsa-private-key: "{{genPrivateKey "rsa" | b64enc}}"
1818
{{- end }}

rootfs/Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ FROM docker.io/library/python:3.9-alpine
22

33
COPY requirements.txt /app/requirements.txt
44

5-
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories \
6-
&& apk add --update --virtual .build-deps \
5+
RUN apk add --update --virtual .build-deps \
76
postgresql-dev \
87
gcc \
98
libffi-dev \

rootfs/api/management/commands/create_oauth2_application.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,19 @@ def handle(self, *args, **options):
2121
user = User.objects.filter(is_superuser=True).first()
2222
if not user:
2323
self.stdout.write("Cannot create because there is no superuser")
24-
application, created = Application.objects.get_or_create(
25-
client_id=client_id,
26-
client_secret=client_secret,
24+
application, updated = Application.objects.update_or_create(
25+
name='Drycc Controller',
2726
defaults={
28-
'name': 'Drycc Controller',
27+
'client_id': client_id,
28+
'client_secret': client_secret,
2929
'user': user,
30-
'redirect_uris': f'{controller_domain}/complete/drycc/',
30+
'redirect_uris': f'{controller_domain}/v2/complete/drycc/',
3131
'authorization_grant_type': 'authorization-code',
3232
'client_type': 'Public',
3333
'algorithm': 'RS256'
3434
}
3535
)
36-
if created:
36+
if updated:
3737
self.stdout.write('Drycc controller app created')
3838
else:
39-
self.stdout.write("Drycc controller app already exists")
39+
self.stdout.write("Drycc controller app updated")

rootfs/api/management/commands/createadminuser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def handle(self, *args, **options):
2020
if password and not username:
2121
raise CommandError("--username is required if specifying --password")
2222
user = self.UserModel._default_manager.db_manager(database).\
23-
get(username=username)
23+
filter(username=username)
2424
if user:
2525
self.stdout.write('That username is already created')
2626
return

0 commit comments

Comments
 (0)