Skip to content

Commit

Permalink
fix: tls issue in scratch container
Browse files Browse the repository at this point in the history
  • Loading branch information
PThorpe92 committed May 22, 2024
1 parent 9f76ca7 commit 5c0198e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o backend .

FROM scratch
COPY --from=builder /app/backend ./
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
EXPOSE 8080
ENTRYPOINT ["./backend"]
3 changes: 2 additions & 1 deletion backend/src/models/oidc_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func OidcClientFromProvider(prov *ProviderPlatform, autoRegister bool) (*OidcCli
body["authorization_code_grant_access_token_lifespan"] = "3h"
body["authorization_code_grant_id_token_lifespan"] = "3h"
body["authorization_code_grant_refresh_token_lifespan"] = "3h"
body["skip_consent"] = false
body["skip_consent"] = true
body["skip_logout_consent"] = true
body["token_endpoint_auth_method"] = "client_secret_basic"
jsonBody, err := json.Marshal(body)
Expand Down Expand Up @@ -140,6 +140,7 @@ func autoRegisterCanvas(prov *ProviderPlatform, oidcClient *OidcClient) (string,
response, err := client.Do(request)
if err != nil {
log.Println("Error sending request: ", err)
return "", err
}
defer response.Body.Close()
if response.StatusCode != http.StatusCreated && response.StatusCode != http.StatusOK {
Expand Down

0 comments on commit 5c0198e

Please sign in to comment.