Skip to content

Commit

Permalink
feat: local authentication
Browse files Browse the repository at this point in the history
- introduce passport
- add a passport local strategy for authentication
- introduce Authentication interface to contain the multiple
auth checks (authenticate, checkAuth, logout)
- scram router module for authentication, logout, and auth check
- no op for no auth
- extend auth support to provide additional functions to all modules
for checking auth, logging out

Contributes-to: strimzi#106

Signed-off-by: Nic Townsend <[email protected]>
  • Loading branch information
nictownsend committed Dec 1, 2020
1 parent 2689890 commit 2c7a7eb
Show file tree
Hide file tree
Showing 47 changed files with 1,237 additions and 306 deletions.
6 changes: 3 additions & 3 deletions config/static.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ const client: Config<Literal> = {
const server: Config<Literal> = {
defaultConfig: {
configValue: {
authentication: {
strategy: 'none',
},
client: {
configOverrides: {},
transport: {},
Expand All @@ -40,6 +37,9 @@ const server: Config<Literal> = {
contextRoot: '/',
port: 9080,
transport: {},
authentication: {
type: 'none',
},
},
session: {
name: 'strimzi-ui',
Expand Down
122 changes: 122 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 11 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,21 @@
"dependencies": {
"@apollo/client": "^3.2.5",
"@apollo/react-hooks": "^4.0.0",
"@walmartlabs/json-to-simple-graphql-schema": "^2.0.3",
"@types/express-session": "^1.17.2",
"@walmartlabs/json-to-simple-graphql-schema": "^2.0.3",
"apollo-client": "^2.6.10",
"apollo-link-http": "^1.5.17",
"apollo-server-express": "^2.18.2",
"axios": "^0.21.0",
"body-parser": "^1.19.0",
"compression-webpack-plugin": "^4.0.0",
"express": "^4.17.1",
"express-session": "^1.17.1",
"express-static-gzip": "^2.1.0",
"fromentries": "^1.3.2",
"graphql": "^15.4.0",
"graphql-tag": "^2.11.0",
"graphql-ws": "^1.14.0",
"helmet": "^4.2.0",
"html-webpack-plugin": "^4.5.0",
"http-proxy": "^1.18.1",
Expand All @@ -68,6 +73,8 @@
"mini-css-extract-plugin": "^0.9.0",
"mustache": "^4.0.1",
"optimize-css-assets-webpack-plugin": "^5.0.4",
"passport": "^0.4.1",
"passport-local": "^1.0.0",
"pino": "^6.7.0",
"pino-filter": "^1.0.0",
"pino-http": "^5.3.0",
Expand Down Expand Up @@ -98,6 +105,8 @@
"@types/jest": "^26.0.15",
"@types/mustache": "^4.0.1",
"@types/node": "^14.14.6",
"@types/passport": "^1.0.4",
"@types/passport-local": "^1.0.33",
"@types/pino": "^6.3.3",
"@types/pino-http": "^5.0.5",
"@types/react-dom": "^16.9.9",
Expand Down Expand Up @@ -126,6 +135,7 @@
"license-check-and-add": "^3.0.4",
"lint-staged": "^10.5.1",
"mock-socket": "^9.0.3",
"nock": "^13.0.5",
"nodemon": "^2.0.6",
"npm-run-all": "^4.1.5",
"prettier": "^2.1.2",
Expand Down
Loading

0 comments on commit 2c7a7eb

Please sign in to comment.