Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft: Some changes #15

Draft
wants to merge 37 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
11b44b1
renewed expired Example SP certificate
davide-perego-runtime Jul 29, 2021
f3ec6da
Added Organization struct to SP metadata
davide-perego-runtime Sep 27, 2021
68b3818
Update module
nicolasvac Oct 28, 2021
6c7c001
Add dynamic contact person in SP structure
nicolasvac Oct 28, 2021
212e14e
Only add extensions if populated
nicolasvac Oct 28, 2021
90221d0
Use if not instead of if !=
nicolasvac Oct 28, 2021
1948a53
Use eq instead of ==
nicolasvac Oct 28, 2021
6d28fa6
Bugfix
nicolasvac Oct 28, 2021
85ee99a
Bugfix
nicolasvac Oct 28, 2021
4a9118e
Bugfix
nicolasvac Oct 28, 2021
61d5c93
Bugfix
nicolasvac Oct 28, 2021
d74e967
Add xmlns:spid
nicolasvac Oct 29, 2021
d1dbad6
Add xmlns:fpa
nicolasvac Oct 29, 2021
c84a117
Add IsPrivateFullAggregator, IsPublicFullAggregator
nicolasvac Oct 29, 2021
f75cffe
Add randomly generated request ids
nicolasvac Oct 29, 2021
69e73e7
Add Signature tag
nicolas-ristocloud Nov 3, 2021
2538d7e
Bugfix _key instead of Key()
nicolas-ristocloud Nov 3, 2021
2b6cd01
Add cert subject
nicolas-ristocloud Nov 3, 2021
1c08609
Bugfix missing _ in requestID and added # on URI=
nicolas-ristocloud Nov 3, 2021
4a55a44
Add isPublic, isPrivate to ContactPerson
nicolas-ristocloud Nov 3, 2021
7e55ca3
Bugfix IsPublic
nicolas-ristocloud Nov 3, 2021
bd70c53
Try adding contact persons dinamically
nicolasvac Nov 3, 2021
73ef362
Bugfix contact persons
nicolasvac Nov 3, 2021
293a3fd
Add PKCS8 Key Support
nicolasvac Nov 4, 2021
11d6a36
Remove redundant cast
nicolasvac Nov 4, 2021
6b203a3
Add verification of IDP XML Signature
nicolasvac Nov 4, 2021
ba8b09e
Add complete error to idp signature verification
nicolasvac Nov 4, 2021
8f64100
Fix Reading XML from bytes
nicolasvac Nov 4, 2021
59ec60d
Remove IDP metadata XML verification
nicolasvac Nov 4, 2021
1335fdb
Save XML document to IDP.XML
nicolasvac Nov 10, 2021
c40e389
Optional sign mechanism
nicolasvac Nov 10, 2021
00d6add
Optional sign mechanism in xml template
nicolasvac Nov 10, 2021
0dd1c29
Sign authnrequest_out.go
nicolasvac Nov 10, 2021
f2c055b
Remove button.go
nicolasvac Nov 10, 2021
4717194
test
nicolasvac Nov 10, 2021
e07b5cb
Bugfix spazi saml:Issuer
nicolas-ristocloud Nov 12, 2021
697beab
Fix SpidL format
nicolas-ristocloud Nov 17, 2021
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
Prev Previous commit
Next Next commit
Remove IDP metadata XML verification
  • Loading branch information
nicolasvac committed Nov 4, 2021
commit 59ec60d55340caf33e038f4b42eef3b244523b03
22 changes: 0 additions & 22 deletions spidsaml/idp.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"encoding/base64"
"encoding/pem"
"fmt"
"github.com/ma314smith/signedxml"
"io/ioutil"
"log"
"os"
Expand Down Expand Up @@ -35,27 +34,6 @@ func NewIDPFromXML(xml []byte) *IDP {
idp := new(IDP)
idp.EntityID = doc.FindElement("/EntityDescriptor").SelectAttr("entityID").Value

// Check if there is a signature present, and in case is present
// use the xml signature validator.
if doc.FindElement("/EntityDescriptor/Signature/SignedInfo") != nil {
// Convert XML to a readable string
xmlString, err := doc.WriteToString()

if err != nil {
panic("Unable to convert IDP XML to String.")
}

// Initialize the validator
validator, err := signedxml.NewValidator(xmlString)

// Check if signature is valid
_, err = validator.ValidateReferences()

if err != nil {
panic(fmt.Sprintf("Unable to verify IDP (%s) Signature. Complete error: %s", idp.EntityID, err))
}
}

// SingleSignOnService
idp.SSOURLs = make(map[SAMLBinding]string)
for _, e := range doc.FindElements("/EntityDescriptor/IDPSSODescriptor/SingleSignOnService") {
Expand Down