Skip to content
This repository has been archived by the owner on May 22, 2023. It is now read-only.

Cobb/ls 26157.saml vuln #5

Merged
merged 169 commits into from
Nov 30, 2021
Merged
Show file tree
Hide file tree
Changes from 167 commits
Commits
Show all changes
169 commits
Select commit Hold shift + click to select a range
9b49e7d
bugfix: New sometimes selected the wrong EntityDescriptor when parsin…
Jun 16, 2017
6ab3142
Add syntax highlight
umayr Jul 10, 2017
aa4e43f
expose CookieMaxAge in samlsp Options
dustin-decker Sep 25, 2017
9477cf4
Merge pull request #96 from umayr/master
crewjam Sep 25, 2017
aa1c598
Enable persistent name id format (#107)
BryceDFisher Sep 25, 2017
54c5d5a
Merge branch 'pr90'
crewjam Sep 25, 2017
a6e02ca
Merge branch 'pr115'
crewjam Sep 25, 2017
56801ab
add ability to set the domain for the cookies (#95)
sevki Sep 25, 2017
50777a1
Fixed script hash to remove JS console errors when redirecting (#117)
crewjam Sep 25, 2017
bb12e77
saml{sp,idp}: add httpOnly and secure flag (conditionally) to cookies…
dustin-decker Sep 25, 2017
5098b49
Use dep package manager (#114)
dustin-decker Sep 25, 2017
febc398
Fix example code so that it compiles (#118)
ptman Sep 26, 2017
5e89d54
expose ForceAuthn (#119)
dustin-decker Sep 26, 2017
bbf4ae9
fix validUntil in SPSSODescriptor
Jan 7, 2018
61c0584
samlsp.Middleware.SecureCookie option (#128)
beyang Jan 7, 2018
90a8ae8
remove cruft
crewjam Jan 7, 2018
f33bc82
update README
crewjam Jan 7, 2018
b1cfb79
fix some minor lint / style errors
crewjam Jan 7, 2018
804bf46
samlsp: use current time for the JWT rather than the IssueInstant fro…
orisano Jan 8, 2018
e9d713d
travis cleanup: remove older go versions (#132)
crewjam Jan 8, 2018
c9c2cbc
samlsp: remove X-Saml headers in favor of attaching Claims to request…
crewjam Jan 8, 2018
f5e68a0
samlsp: move the setting and reading of cookies into an interface (#133)
crewjam Jan 8, 2018
16d16c2
add field to IdpAuthnRequest so you can externally control the “curre…
crewjam Jan 10, 2018
794aa92
idp: handle assertions where no ACS url is specified (#139)
crewjam Feb 21, 2018
814d1d9
add test cases for SAML comment injection (#140)
crewjam Feb 28, 2018
e231b7a
Update PGP key in README.md
crewjam Mar 16, 2018
d6cac45
make MaxIssueDelay configurable at runtime (mini-hack)
crewjam Aug 1, 2018
eefba21
Remove the default xmlns from the expected output because the encoder…
dherbst Aug 20, 2018
8f169cc
Added Travis badge (#159)
dherbst Aug 20, 2018
61e52e7
Fixed some typos in the README.md file. (#160)
dherbst Aug 20, 2018
449e95b
dep ensure [ch16254] (#156)
neha0912 Aug 20, 2018
a4cce22
add the ability to use custom cookie names and domain
Aug 20, 2018
e928cf4
fix missing time on IDP-initiated IdpAuthnRequest (#147)
Aug 20, 2018
e8774a4
added godoc badge to README.md (#143)
tux21b Aug 20, 2018
42c78b1
made selected binding configureable (#144)
tux21b Aug 20, 2018
6b183f4
Fix AES decryption (#142)
volkangurel Aug 20, 2018
8ccd3e0
idp: Allow intermediates to be encoded in signature (#127)
apilloud Aug 20, 2018
8be1aab
idp: Make signature method configurable (#126)
apilloud Aug 20, 2018
9bb91e8
Removed %s format for claims audience not matching Provider EntityID …
dherbst Aug 20, 2018
545fa68
add support for a logout URL binding
crewjam Aug 29, 2018
ebc5f78
add stale integration
crewjam Aug 31, 2018
d99784d
add support for other external middleware (#184)
exedor May 1, 2019
727f495
#192: Support multiple IdP signing certificates
May 1, 2019
2076e45
#192: Account for Go/check changes.
May 1, 2019
724cb1c
Handle root URL's with trailing slash
Apr 2, 2019
d288d9a
#194: Properly default EncryptionMethod/DigestMethod when not present.
May 6, 2019
ca21de9
Allow AudienceRestriction to be missing
May 8, 2019
344d075
Don't include the port with the domain when setting the cookie (#202)
digininja May 21, 2019
6e8a81a
update value of UnspecifiedNameIDFormat and EmailAddressNameIDFormat …
novalagung Oct 29, 2019
78a11e9
Don't require Destination attribute in response when response is not …
cvermilion Oct 29, 2019
abf7560
Replaces testshib.org with samltest.id in the README (#211)
joesiltberg Oct 29, 2019
1533bb5
Set the default domain for cookies properly (#187)
dcormier Oct 29, 2019
4a6d0a9
Separate response validation from the Middleware so that ServiceProvi…
tebruno99 Jun 13, 2019
44907b5
Adding support for eduPersonScopedAffiliation
Jun 24, 2019
14f9954
Add in actual attribute evaluation for eduPersonScopedAffiliation.
Jun 24, 2019
71a99f9
Fix typo for idp example path in readme (#170)
ferhatelmas Oct 29, 2019
b20013a
omit validUntil if empty (#190)
chistogo Oct 29, 2019
72834b5
Prevent panic caused by IDP-initiated login (#183)
praneetloke Oct 29, 2019
87f373d
SP: Add capability to provide intermediate certs (#178)
BenJuan26 Oct 29, 2019
c36824a
remove bad import
crewjam Oct 29, 2019
f684913
remove log junk
crewjam Oct 29, 2019
4936c1b
fix compile error
crewjam Oct 29, 2019
4acac2f
Gopkg -> go.mod
crewjam Oct 29, 2019
e3546eb
tests: convert from go-check to testify
crewjam Oct 29, 2019
fc8df63
lint with golangci-lint
crewjam Oct 29, 2019
fe20026
lint with golangci-lint
crewjam Oct 29, 2019
90fc209
Merge branch 'master' of github.com:crewjam/saml
crewjam Oct 29, 2019
ff5e2ca
fix go.mod
crewjam Oct 29, 2019
562a895
fix travis configuration
crewjam Oct 29, 2019
387c07c
fix travis configuration
crewjam Oct 29, 2019
70ab2e9
Use RS256 rather than HS256
Aug 5, 2019
b822498
Add Single Logout data structure
Oct 30, 2018
41e40c0
Set session NameID based on email
gracenoah Jul 13, 2018
8611714
update test expectations
crewjam Oct 29, 2019
75440c9
removed mandatory check for validating embedded certificate for rsa
Oct 30, 2019
2cf64eb
Rename validateRSAKey to validateRSAKeyIfPresent
gotjosh Oct 30, 2019
f521243
Merge pull request #226 from grafana/rsa-key-validation-optional
crewjam Oct 30, 2019
c42136e
Removes unused dependencies
xlson Oct 31, 2019
5eedd07
travis: pin golangci-lint version
crewjam Oct 31, 2019
3068c6a
Bump github.com/beevik/etree from 1.0.1 to 1.1.0
dependabot-preview[bot] Oct 29, 2019
04d0562
update test expectations
crewjam Oct 30, 2019
62f4c47
Return status code if not success
ecmrauh Sep 3, 2018
86948ad
Make cert optional for ServiceProvider.Metadata()
msteffen Oct 20, 2018
5ec9c96
Add test case from OneLogin
crewjam Nov 1, 2019
23ac824
Remove 'Failing' from certificate missing check
BryceDFisher Jun 19, 2017
93d07ad
(Add tests for) Destination is checked only if this is a signed SAML …
jasiek Sep 22, 2017
28fdf79
update readme to reflect our inability to produce encrypted assertions
crewjam Nov 1, 2019
e81117b
fix bad merge
crewjam Nov 1, 2019
017fca4
golangci: require comments, add a few missing ones
crewjam Nov 1, 2019
438f1aa
golangci: require comments, add a few missing ones
crewjam Nov 1, 2019
5b97207
update test expectations
crewjam Nov 4, 2019
1bde040
schema: don't include empty Format attributes in samlp:NameIDPolicyEl…
crewjam Nov 4, 2019
29c9e64
Merge branch 'master' of github.com:crewjam/saml
crewjam Nov 4, 2019
f73528f
make ValidDuration configurable for IDP. (#235)
like-a-bause Nov 20, 2019
695c7b1
refactor samlsp package to be more modular (#230)
crewjam Nov 22, 2019
0acc933
Add optional callback for signature verification (#237)
joesiltberg Dec 2, 2019
861266e
AllowIDPInitiated=true allows both IDP-initiated and normal (#240)
Dec 6, 2019
9cb6acf
Bump github.com/kr/pretty from 0.1.0 to 0.2.0 (#243)
dependabot-preview[bot] Jan 4, 2020
cdaa4af
add HTTPOnly bool to CookieSessionProvider (#248)
danielhochman Jan 24, 2020
a8bc8f9
feat(slo): add logout response request validation (#247)
mmailhos Jan 24, 2020
bbcdf4f
fix(slo): fix SessionIndex attribute in LogoutRequest (#245)
mmailhos Jan 24, 2020
eefb3b2
clean up README about breaking changes
crewjam Jan 24, 2020
0e0bf51
feat(slo): add Bytes() and Deflate() functions for LogoutRequest (#251)
mmailhos Jan 31, 2020
625396c
fix(sp): no check for InResponseTo for if IDPInitiated is true (#259)
mmailhos Feb 2, 2020
1e8b902
Add EntityID (#258)
miketonks Feb 3, 2020
17489b9
feat: add Post / Redirect methods for LogoutRequest (#260)
andy2046 Feb 6, 2020
ad43eca
Update README.md (#261)
afritzler Feb 10, 2020
6366720
Bump github.com/stretchr/testify from 1.4.0 to 1.5.0 (#263)
dependabot-preview[bot] Feb 19, 2020
530d24b
Bump github.com/stretchr/testify from 1.5.0 to 1.5.1 (#264)
dependabot-preview[bot] Feb 25, 2020
9843f17
Include a path when clearing the cookie (#278)
rkuris Apr 15, 2020
97641c4
SessionNotOnOrAfter is serialized to XML if set (#292)
alindeman Aug 5, 2020
1897fa4
Fixes handling signed response with encrypted assertions (#273)
ricardofandrade Aug 5, 2020
d73f220
Bump github.com/kr/pretty from 0.2.0 to 0.2.1 (#294)
dependabot-preview[bot] Aug 5, 2020
26c2a94
Bump github.com/stretchr/testify from 1.5.1 to 1.6.1 (#288)
dependabot-preview[bot] Aug 5, 2020
a526f45
Add support for signed authnRequest (#296)
ricardofandrade Aug 11, 2020
c04b06a
Update metadata.go (#297)
bstrueb Aug 11, 2020
c6a85f7
Allows configuring SameSite for session cookie (#276)
dcormier Aug 12, 2020
7b5f0d5
fix lint errors & update test expectations
crewjam Aug 12, 2020
27486cc
update README re: security issues
crewjam Aug 12, 2020
6437b54
fix test expectation for go 1.15
crewjam Aug 12, 2020
9a3d01f
remove output cruft from xmlenc test
crewjam Aug 12, 2020
a606939
[SECURITY] bump version of goxmldsig [CVE-2020-15216]
crewjam Sep 29, 2020
da4f1a0
Merge pull request from GHSA-4hq8-gmxx-h6w9
crewjam Dec 14, 2020
0dd2422
fix version of xml-roundtrip-validator in go.mod
crewjam Dec 14, 2020
3e96b14
add SignLogoutResponse SignLogoutRequest MakeLogoutResponse
andy2046 Dec 8, 2020
6f60b3c
add SessionIndex to claims Attributes
andy2046 Dec 10, 2020
61ad7bf
Include a domain when clearing the cookie
neilli-sable Nov 4, 2020
99bc9e1
identity_provider: extend session with CustomAttributes (#310)
alexmaze Dec 14, 2020
c30d706
fix: logout response element Response -> LogoutResponse (#305)
inconshreveable Dec 14, 2020
6ab128f
Spread the use of option SameSite to tracking cookies (#302)
sly-roar Dec 14, 2020
6614c51
fix formatting
crewjam Dec 14, 2020
243bfae
travis -> github actions
crewjam Dec 14, 2020
e986100
fix typo in README
crewjam Dec 14, 2020
6013850
update test expectations
crewjam Dec 14, 2020
9ce1492
Stop validating InResponseTo when AllowIDPInitiated is set
crewjam Dec 14, 2020
3bb7a4b
set cookie domain when clearing request tracker cookie (#321)
crewjam Dec 14, 2020
92f529c
samlsp: make middleware endpoints public (#323)
crewjam Dec 14, 2020
a9a9703
samlsp: remove deprecated fields (#324)
crewjam Dec 14, 2020
48af097
add test that we can marshal an AuthnStatement without SessionNotOnOr…
crewjam Dec 16, 2020
4550258
samlsp: fix validating response with no issuer element (#328)
alexanderzobnin Dec 24, 2020
dbb13a8
in tests, replace long strings with files we read from testdata/
crewjam Dec 24, 2020
c2702ea
replace testify (which is more or less unmaintained) with gotest.tools
crewjam Dec 27, 2020
d00c43e
remove redundant []byte conversions
crewjam Dec 27, 2020
6f84a3f
explicitly copy loop iterator variables
crewjam Dec 27, 2020
bca570a
fix spelling of test data file
crewjam Dec 27, 2020
cc43707
add maintainer action to update dependencies
crewjam Dec 28, 2020
4ffb03c
adjust maintainer action to update dependencies
crewjam Dec 28, 2020
07f15a6
Update go.mod
web-flow Dec 28, 2020
18eee01
Fix AuthN Request signing for HTTP-Redirect binding (#339)
jkakavas Mar 25, 2021
86638df
SplitHostPort on DeleteSession (#335)
yuki2006 Mar 25, 2021
7bb5c5a
Add explicit tests for XSW (#338)
jkakavas Mar 25, 2021
0e039c0
Custom relayState generator (#337)
haalcala Mar 25, 2021
844adc9
Update go.mod (#331)
github-actions[bot] Mar 25, 2021
5f7364e
Bump github.com/google/go-cmp from 0.5.4 to 0.5.5 (#336)
dependabot-preview[bot] Mar 25, 2021
c090542
update README (#340)
crewjam Mar 25, 2021
bd15f54
Update go.mod (#342)
github-actions[bot] Apr 2, 2021
af97bd2
Update go.mod (#343)
github-actions[bot] Apr 5, 2021
0f63feb
Change dgrijalva/jwt-go imported module to form3tech-oss/jwt-go. (#344)
KuangEleven Apr 12, 2021
b115a40
Upgrade to GitHub-native Dependabot (#346)
dependabot-preview[bot] May 14, 2021
29c6295
Make SP check more certs in IDP metadata (#353)
eest May 21, 2021
5e3cd37
bring monorepo lightstep/saml changes into lightstep forked saml repo…
mattcobb Nov 11, 2021
6caea6a
merge with upstream
mattcobb Nov 11, 2021
b319fc9
Fix merge problems
mattcobb Nov 12, 2021
764cd84
Fix valid until tests
mattcobb Nov 19, 2021
321c4d3
req.now may not be initialized in MakeResponse() so use Now()
mattcobb Nov 24, 2021
d75c181
use TimeNow()
mattcobb Nov 24, 2021
212480b
req.now not guaranteed to be defined. Use TimeNow() in IdpAuthnReques…
mattcobb Nov 30, 2021
ae34ca8
Remove old code from comments, remove commented out Skip(broken)
mattcobb Nov 30, 2021
a2431ea
use upstream's new validateDestination, but modify it to use urlsMatc…
mattcobb Nov 30, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: gomod
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
17 changes: 17 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security
# Label to use when marking an issue as stale
staleLabel: wontfix
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: true
24 changes: 24 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Presubmit
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
check:
name: Presubmit checks
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.13
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Get dependencies
run: |
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(go env GOPATH)/bin v1.24.0
- name: Lint
run: golangci-lint run
- name: Test
run: go test -v ./...
34 changes: 34 additions & 0 deletions .github/workflows/maint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Maintainer
on:
workflow_dispatch:
schedule:
- cron: "0 12 * * 0"
jobs:
upgrade_go:
name: Upgrade go.mod
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: "^1.17.0"
- name: Install goupdate
run: |
(
cd $(mktemp -d)
go get github.com/crewjam/goupdate
)
git config --global user.email noreply@github.com
git config --global user.name "Github Actions"
- name: Update go.mod
run: |
go version
go env
$(go env GOPATH)/bin/goupdate -test 'go test ./...' --commit -v
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
commit-message: "Update go.mod"
branch: auto/update-go
title: "Update go.mod"
body: ""
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
coverage.out
coverage.html
vendor/

# IDE-specific settings
.idea
.vscode
78 changes: 78 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Configuration file for golangci-lint
#
# https://github.com/golangci/golangci-lint
#
# fighting with false positives?
# https://github.com/golangci/golangci-lint#nolint

linters:
enable:
- gofmt # Gofmt checks whether code was gofmt-ed. By default this tool runs with -s option to check for code simplification [fast: true, auto-fix: true]
- goimports # Goimports does everything that gofmt does. Additionally it checks unused imports [fast: true, auto-fix: true]
- gosec # Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases [fast: true, auto-fix: false]
- misspell # Finds commonly misspelled English words in comments [fast: true, auto-fix: true]
- deadcode # Finds unused code [fast: true, auto-fix: false]
- golint # Golint differs from gofmt. Gofmt reformats Go source code, whereas golint prints out style mistakes [fast: true, auto-fix: false]
- unconvert # Remove unnecessary type conversions [fast: true, auto-fix: false]

disable:
# TODO(ross): fix errors reported by these checkers and enable them
- bodyclose # checks whether HTTP response body is closed successfully [fast: false, auto-fix: false]
- depguard # Go linter that checks if package imports are in a list of acceptable packages [fast: true, auto-fix: false]
- dupl # Tool for code clone detection [fast: true, auto-fix: false]
- errcheck # Inspects source code for security problems [fast: true, auto-fix: false]
- gochecknoglobals # Checks that no globals are present in Go code [fast: true, auto-fix: false]
- gochecknoinits # Checks that no init functions are present in Go code [fast: true, auto-fix: false]
- goconst # Finds repeated strings that could be replaced by a constant [fast: true, auto-fix: false]
- gocritic # The most opinionated Go source code linter [fast: true, auto-fix: false]
- gocyclo # Computes and checks the cyclomatic complexity of functions [fast: true, auto-fix: false]
- gosimple # Linter for Go source code that specializes in simplifying a code [fast: false, auto-fix: false]
- govet # Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string [fast: false, auto-fix: false]
- ineffassign # Detects when assignments to existing variables are not used [fast: true, auto-fix: false]
- interfacer # Linter that suggests narrower interface types [fast: false, auto-fix: false]
- lll # Reports long lines [fast: true, auto-fix: false]
- maligned # Tool to detect Go structs that would take less memory if their fields were sorted [fast: true, auto-fix: false]
- nakedret # Finds naked returns in functions greater than a specified function length [fast: true, auto-fix: false]
- prealloc # Finds slice declarations that could potentially be preallocated [fast: true, auto-fix: false]
- scopelint # Scopelint checks for unpinned variables in go programs [fast: true, auto-fix: false]
- staticcheck # Staticcheck is a go vet on steroids, applying a ton of static analysis checks [fast: false, auto-fix: false]
- structcheck # Finds unused struct fields [fast: true, auto-fix: false]
- stylecheck # Stylecheck is a replacement for golint [fast: false, auto-fix: false]
- typecheck # Like the front-end of a Go compiler, parses and type-checks Go code [fast: true, auto-fix: false]
- unparam # Reports unused function parameters [fast: false, auto-fix: false]
- unused # Checks Go code for unused constants, variables, functions and types [fast: false, auto-fix: false]
- varcheck # Finds unused global variables and constants [fast: true, auto-fix: false]
linters-settings:
goimports:
local-prefixes: github.com/lightstep/saml
govet:
disable:
- shadow
enable:
- asmdecl
- assign
- atomic
- bools
- buildtag
- cgocall
- composites
- copylocks
- errorsas
- httpresponse
- loopclosure
- lostcancel
- nilfunc
- printf
- shift
- stdmethods
- structtag
- tests
- unmarshal
- unreachable
- unsafeptr
- unusedresult
issues:
exclude-use-default: false
exclude:
- G104 # 'Errors unhandled. (gosec)

6 changes: 0 additions & 6 deletions .travis.yml

This file was deleted.

21 changes: 0 additions & 21 deletions NOTES.md

This file was deleted.

Loading