Skip to content
This repository has been archived by the owner on Jul 28, 2021. It is now read-only.

Remove Control Character in jwt-config Helm Template #46

Open
wants to merge 4 commits into
base: development
Choose a base branch
from
Open
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
3 changes: 2 additions & 1 deletion adapter/strategy/web/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"math/rand"
"net/http"
"net/url"
"path"
"time"
"unsafe"

Expand Down Expand Up @@ -72,7 +73,7 @@ func generateAuthorizationURL(c client.Client, redirectURI string, state string)

// buildRequestURL constructs the original url from the request object
func buildRequestURL(action *authnz.RequestMsg) string {
return action.Scheme + "://" + action.Host + action.Path
return action.Scheme + "://" + path.Join(action.Host, action.Path)
}

// buildTokenCookieName constructs the cookie name
Expand Down
26 changes: 25 additions & 1 deletion helm/appidentityandaccessadapter/templates/jwt-config.yaml
Original file line number Diff line number Diff line change
@@ -1 +1,25 @@
apiVersion: apiextensions.k8s.io/v1beta1kind: CustomResourceDefinitionmetadata: name: jwtconfigs.security.cloud.ibm.comspec: group: security.cloud.ibm.com versions: - name: v1 served: true storage: true scope: Namespaced names: plural: jwtconfigs singular: jwtconfig kind: JwtConfig validation: openAPIV3Schema: properties: spec: required: - jwksUrl properties: jwksUrl: type: string pattern: '^(?:http(s)?:\/\/)?((([a-z\d]([a-z\d-]*[a-z\d])*)\.)+[a-z]{2,}|((\d{1,3}\.){3}\d{1,3}))(\:\d+)?(\/[-a-z\d%_.~+]*)*(\?[;&a-z\d%_.~+=-]*)?(\#[-a-z\d_]*)?$'
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: jwtconfigs.security.cloud.ibm.com
spec:
group: security.cloud.ibm.com
versions:
- name: v1
served: true
storage: true
scope: Namespaced
names:
plural: jwtconfigs
singular: jwtconfig
kind: JwtConfig
validation:
openAPIV3Schema:
properties:
spec:
required:
- jwksUrl
properties:
jwksUrl:
type: string
pattern: '^(?:http(s)?:\/\/)?((([a-z\d]([a-z\d-]*[a-z\d])*)\.)+[a-z]{2,}|((\d{1,3}\.){3}\d{1,3}))(\:\d+)?(\/[-a-z\d%_.~+]*)*(\?[;&a-z\d%_.~+=-]*)?(\#[-a-z\d_]*)?$'