Skip to content

Commit

Permalink
Merge pull request #2838 from BSFishy/custom_attributes_fix
Browse files Browse the repository at this point in the history
fix: enable removing access application custom attributes and claims
  • Loading branch information
jacobbednarz authored Aug 9, 2024
2 parents 73016b9 + aa359a1 commit 05d4578
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 deletions.
3 changes: 3 additions & 0 deletions .changelog/2838.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-notes:bug
access_application: enable removing access application custom attributes and claims
```
20 changes: 10 additions & 10 deletions access_application.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,15 +224,15 @@ type SaasApplication struct {
AuthType string `json:"auth_type,omitempty"`

// SAML saas app
ConsumerServiceUrl string `json:"consumer_service_url,omitempty"`
SPEntityID string `json:"sp_entity_id,omitempty"`
IDPEntityID string `json:"idp_entity_id,omitempty"`
NameIDFormat string `json:"name_id_format,omitempty"`
SSOEndpoint string `json:"sso_endpoint,omitempty"`
DefaultRelayState string `json:"default_relay_state,omitempty"`
CustomAttributes []SAMLAttributeConfig `json:"custom_attributes,omitempty"`
NameIDTransformJsonata string `json:"name_id_transform_jsonata,omitempty"`
SamlAttributeTransformJsonata string `json:"saml_attribute_transform_jsonata"`
ConsumerServiceUrl string `json:"consumer_service_url,omitempty"`
SPEntityID string `json:"sp_entity_id,omitempty"`
IDPEntityID string `json:"idp_entity_id,omitempty"`
NameIDFormat string `json:"name_id_format,omitempty"`
SSOEndpoint string `json:"sso_endpoint,omitempty"`
DefaultRelayState string `json:"default_relay_state,omitempty"`
CustomAttributes *[]SAMLAttributeConfig `json:"custom_attributes"`
NameIDTransformJsonata string `json:"name_id_transform_jsonata,omitempty"`
SamlAttributeTransformJsonata string `json:"saml_attribute_transform_jsonata"`

// OIDC saas app
ClientID string `json:"client_id,omitempty"`
Expand All @@ -242,7 +242,7 @@ type SaasApplication struct {
Scopes []string `json:"scopes,omitempty"`
AppLauncherURL string `json:"app_launcher_url,omitempty"`
GroupFilterRegex string `json:"group_filter_regex,omitempty"`
CustomClaims []OIDCClaimConfig `json:"custom_claims,omitempty"`
CustomClaims *[]OIDCClaimConfig `json:"custom_claims"`
AllowPKCEWithoutClientSecret *bool `json:"allow_pkce_without_client_secret,omitempty"`
RefreshTokenOptions *RefreshTokenOptions `json:"refresh_token_options,omitempty"`
HybridAndImplicitOptions *AccessApplicationHybridAndImplicitOptions `json:"hybrid_and_implicit_options,omitempty"`
Expand Down
8 changes: 4 additions & 4 deletions access_application_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1011,7 +1011,7 @@ func TestCreateSAMLSaasAccessApplications(t *testing.T) {
SPEntityID: "dash.example.com",
NameIDFormat: "id",
DefaultRelayState: "https://saas.example.com",
CustomAttributes: []SAMLAttributeConfig{
CustomAttributes: &[]SAMLAttributeConfig{
{
Name: "test1",
NameFormat: "urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified",
Expand Down Expand Up @@ -1166,7 +1166,7 @@ func TestCreateOIDCSaasAccessApplications(t *testing.T) {
AppLauncherURL: "https://saas.example.com",
GroupFilterRegex: ".*",
AllowPKCEWithoutClientSecret: BoolPtr(false),
CustomClaims: []OIDCClaimConfig{
CustomClaims: &[]OIDCClaimConfig{
{
Name: "test1",
Source: SourceConfig{Name: "test1"},
Expand Down Expand Up @@ -1197,7 +1197,7 @@ func TestCreateOIDCSaasAccessApplications(t *testing.T) {
AppLauncherURL: "https://saas.example.com",
GroupFilterRegex: ".*",
AllowPKCEWithoutClientSecret: BoolPtr(false),
CustomClaims: []OIDCClaimConfig{
CustomClaims: &[]OIDCClaimConfig{
{
Name: "test1",
Source: SourceConfig{Name: "test1"},
Expand Down Expand Up @@ -1229,7 +1229,7 @@ func TestCreateOIDCSaasAccessApplications(t *testing.T) {
AppLauncherURL: "https://saas.example.com",
GroupFilterRegex: ".*",
AllowPKCEWithoutClientSecret: BoolPtr(false),
CustomClaims: []OIDCClaimConfig{
CustomClaims: &[]OIDCClaimConfig{
{
Name: "test1",
Source: SourceConfig{Name: "test1"},
Expand Down

0 comments on commit 05d4578

Please sign in to comment.