Skip to content

Commit eb009f9

Browse files
committed
Fix metadata endpoint to produce valid saml metadata
1 parent e046dab commit eb009f9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

api/provider/saml.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,10 @@ func (p SamlProvider) SPMetadata() ([]byte, error) {
166166
return nil, err
167167
}
168168

169+
// the typing for encryption methods currently causes the xml to violate the spec
170+
// therefore they are removed since they are optional anyways and mostly unused
171+
metadata.SPSSODescriptor.KeyDescriptors[1].EncryptionMethods = []types.EncryptionMethod{}
172+
169173
rawMetadata, err := xml.Marshal(metadata)
170174
if err != nil {
171175
return nil, err

0 commit comments

Comments
 (0)