Skip to content

Commit

Permalink
fix: add saml application
Browse files Browse the repository at this point in the history
  • Loading branch information
stebenz committed Jan 25, 2024
1 parent c0b57b9 commit f692bba
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ import (
"github.com/zitadel/terraform-provider-zitadel/zitadel/helper/test_utils"
)

const metadataXML = "<?xml version=\"1.0\"?>\n<md:EntityDescriptor xmlns:md=\"urn:oasis:names:tc:SAML:2.0:metadata\"\n validUntil=\"2024-01-26T17:48:38Z\"\n cacheDuration=\"PT604800S\"\n entityID=\"http://example.com/saml/metadata\">\n <md:SPSSODescriptor AuthnRequestsSigned=\"false\" WantAssertionsSigned=\"false\" protocolSupportEnumeration=\"urn:oasis:names:tc:SAML:2.0:protocol\">\n <md:NameIDFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified</md:NameIDFormat>\n <md:AssertionConsumerService Binding=\"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST\"\n Location=\"http://example.com/saml/cas\"\n index=\"1\" />\n \n </md:SPSSODescriptor>\n</md:EntityDescriptor>"

func Create(t *testing.T, frame *test_utils.OrgTestFrame, projectID, name string) (string, string) {
return test_utils.CreateDefaultDependency(t, "zitadel_application_saml", application_saml.AppIDVar, func() (string, error) {
app, err := frame.AddSAMLApp(frame, &management.AddSAMLAppRequest{
ProjectId: projectID,
Name: name,
Metadata: &management.AddSAMLAppRequest_MetadataXml{MetadataXml: []byte("metadata")},
Metadata: &management.AddSAMLAppRequest_MetadataXml{MetadataXml: []byte(metadataXML)},
})
return app.GetAppId(), err
})
Expand Down

0 comments on commit f692bba

Please sign in to comment.