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

Preview of SSO for browser #1478

Merged
merged 50 commits into from
Aug 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
ed477f3
Initial implementation
OskarDamkjaer Jul 20, 2021
2d864d0
Remove dep on querystring
OskarDamkjaer Jul 20, 2021
2aff3dc
Restore search params properly
OskarDamkjaer Jul 20, 2021
e881ae7
Remove unneeded changes
OskarDamkjaer Jul 20, 2021
e6546ae
Touch up connect frame and update licenses
OskarDamkjaer Jul 20, 2021
f7494a8
Cleanup discovery duck
OskarDamkjaer Jul 20, 2021
0a9a929
Add helper fns to discovery duck
OskarDamkjaer Jul 20, 2021
023cf7b
cleanup
OskarDamkjaer Jul 20, 2021
3bdccf8
Touch up connect frame
OskarDamkjaer Jul 20, 2021
f1e574e
Respect discoveryURL param
OskarDamkjaer Jul 20, 2021
007dd5c
Borrow bloom auth debugger fn
OskarDamkjaer Jul 20, 2021
972c5be
Updated auth code from bloom
OskarDamkjaer Jul 24, 2021
60b1e79
Fix keycloak implicit flow
OskarDamkjaer Jul 24, 2021
b35996c
cleanup
OskarDamkjaer Jul 26, 2021
2fb5590
Add bloom updates
OskarDamkjaer Jul 26, 2021
673b96e
Fix crashes
OskarDamkjaer Jul 26, 2021
e80fd11
mellan
OskarDamkjaer Jul 26, 2021
123d4ce
Update tests
OskarDamkjaer Jul 26, 2021
d291114
fix styling
OskarDamkjaer Jul 26, 2021
984cac6
Add better logging
OskarDamkjaer Jul 27, 2021
015a73a
mel
OskarDamkjaer Jul 27, 2021
3ebc1c7
Show error messages from SSO
OskarDamkjaer Jul 27, 2021
7c8fcc8
Self review
OskarDamkjaer Jul 27, 2021
413bcfc
Fix normal discovery
OskarDamkjaer Jul 27, 2021
25eb2c6
Downloadable logs
OskarDamkjaer Jul 28, 2021
b81a87b
Update naming as per review comments
OskarDamkjaer Jul 30, 2021
41fe35b
comments
OskarDamkjaer Aug 1, 2021
d03a887
Fix comment around logging
OskarDamkjaer Aug 1, 2021
ac2abd0
Add rejections per review comments
OskarDamkjaer Aug 1, 2021
25aca12
Fix comment about history.replace
OskarDamkjaer Aug 1, 2021
29f1bca
More throws
OskarDamkjaer Aug 1, 2021
a928eea
List missing keys on invalid sso provider
OskarDamkjaer Aug 1, 2021
130f20e
Update log message about principal and secure context
OskarDamkjaer Aug 1, 2021
7d07f8a
Use constant for url param
OskarDamkjaer Aug 1, 2021
c9183d7
Stop log and throwing
OskarDamkjaer Aug 1, 2021
3070bc3
Improve error handling
OskarDamkjaer Aug 1, 2021
87d107c
Add better types
OskarDamkjaer Aug 2, 2021
7555dc1
Helper fn for getting valid sso providers
OskarDamkjaer Aug 2, 2021
f5483aa
Handle connectURL and multiple discovery endpoints properly
OskarDamkjaer Aug 2, 2021
49afb59
Update from jons review comments
OskarDamkjaer Aug 2, 2021
106686a
Add discovery logs to :debug frame
OskarDamkjaer Aug 2, 2021
62977ea
Update styling as per lizas comments
OskarDamkjaer Aug 2, 2021
7c46548
Fix typo
OskarDamkjaer Aug 2, 2021
e2e4fba
Rename provider id
OskarDamkjaer Aug 2, 2021
16f0e40
remove extra newline in :debug logs
OskarDamkjaer Aug 2, 2021
7d9ebae
Move code to styled comp
OskarDamkjaer Aug 2, 2021
261556d
Cleanup comment
OskarDamkjaer Aug 2, 2021
e9261ed
Fix unit tests
OskarDamkjaer Aug 10, 2021
cd4f55a
Merge branch 'master' into sso
OskarDamkjaer Aug 10, 2021
757d15a
Merge master
OskarDamkjaer Aug 10, 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
26 changes: 26 additions & 0 deletions LICENSES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5805,6 +5805,32 @@ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEAL

-----

The following software may be included in this product: jwt-decode. A copy of the source code may be downloaded from git://github.com/auth0/jwt-decode. This software contains the following license and notice below:

The MIT License (MIT)

Copyright (c) 2015 Auth0, Inc. <support@auth0.com> (http://auth0.com)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

-----

The following software may be included in this product: keyboard-key. A copy of the source code may be downloaded from git+ssh://github.com/levithomason/keyboard-key.git. This software contains the following license and notice below:

MIT License
Expand Down
4 changes: 4 additions & 0 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1275,6 +1275,10 @@ Third-party licenses
│ ├─ jws@4.0.0
│ │ ├─ URL: git://github.com/brianloveswords/node-jws.git
│ │ └─ VendorName: Brian J Brennan
│ ├─ jwt-decode@3.1.2
│ │ ├─ URL: git://github.com/auth0/jwt-decode
│ │ ├─ VendorName: Jose F. Romaniello
│ │ └─ VendorUrl: https://github.com/auth0/jwt-decode#readme
│ ├─ keyboard-key@1.1.0
│ │ ├─ URL: git+ssh://github.com/levithomason/keyboard-key.git
│ │ └─ VendorName: Levi Thomason
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@
"isomorphic-fetch": "^2.2.1",
"jsonic": "^0.3.0",
"jszip": "^3.2.2",
"jwt-decode": "^3.1.2",
"lodash-es": "^4.17.15",
"memoize-one": "^5.2.1",
"monaco-editor": "0.23.0",
Expand Down
12 changes: 12 additions & 0 deletions src/browser/AppInit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ import { shouldAllowOutgoingConnections } from 'shared/modules/dbMeta/dbMetaDuck
import { getUuid } from 'shared/modules/udc/udcDuck'
import { DndProvider } from 'react-dnd'
import { HTML5Backend } from 'react-dnd-html5-backend'
import {
restoreSearchAndHashParams,
wasRedirectedBackFromSSOServer
} from 'shared/modules/auth/common'

// Configure localstorage sync
applyKeys(
Expand Down Expand Up @@ -199,6 +203,14 @@ export function setupSentry(): void {
// Introduce environment to be able to fork functionality
const env = detectRuntimeEnv(window, NEO4J_CLOUD_DOMAINS)

// SSO requires a redirect that removes our search parameters
// To work around this they are stored in sessionStorage before
// we redirect to the server, and then restore them when we get
// redirected back
if (wasRedirectedBackFromSSOServer()) {
restoreSearchAndHashParams()
}

// URL we're on
const url = window.location.href

Expand Down
8 changes: 4 additions & 4 deletions src/browser/components/buttons/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ export const NavigationButtonContainer = styled.li<{ isOpen: boolean }>`

const StyledFormButton = styled.button`
color: ${props => props.theme.primaryButtonText};
background-color: ${props => props.theme.primaryButtonBackground};
border: 1px solid ${props => props.theme.primaryButtonBackground};
background-color: ${props => props.theme.primary};
border: 1px solid ${props => props.theme.primary};
font-family: ${props => props.theme.primaryFontFamily};
padding: 6px 18px;
margin-right: 10px;
Expand All @@ -129,9 +129,9 @@ const StyledFormButton = styled.button`
border-radius: 4px;
line-height: 20px;
&:hover {
background-color: ${props => props.theme.secondaryButtonBackgroundHover};
background-color: ${props => props.theme.primary50};
color: ${props => props.theme.secondaryButtonTextHover};
border: 1px solid ${props => props.theme.secondaryButtonBackgroundHover};
border: 1px solid ${props => props.theme.primary50};
}
`

Expand Down
7 changes: 7 additions & 0 deletions src/browser/components/headers/Headers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,10 @@ export const H3 = styled.h3`
font-family: ${props => props.theme.primaryFontFamily};
color: ${props => props.theme.headerText};
`
export const H4 = styled.h3`
font-weight: 500;
font-size: 18px;
font-family: ${props => props.theme.primaryFontFamily};
color: ${props => props.theme.headerText};
margin-bottom: 32px;
`
Loading