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
- remove empty placeholder file

Contributes to: strimzi#106

Signed-off-by: Nic Townsend <[email protected]>
  • Loading branch information
nictownsend committed Dec 14, 2020
1 parent 5fdcdba commit c67aaa4
Show file tree
Hide file tree
Showing 48 changed files with 1,199 additions and 271 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
2 changes: 1 addition & 1 deletion linting/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const rulesets = [

const customRules = {
// prefer spaces (2) over tabs for indentation - tab width can be changed, space cannot
indent: ['error', 2],
indent: ['error', 2, { SwitchCase: 1 }],
// all lines to have semicolons to end statements
semi: ['error', 'always'],
};
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,17 +45,22 @@
"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",
"compression-webpack-plugin": "^6.0.5",
"css-minimizer-webpack-plugin": "^1.1.5",
"axios": "^0.21.0",
"body-parser": "^1.19.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": "^5.0.0-alpha.14",
"http-proxy": "^1.18.1",
Expand All @@ -68,6 +73,8 @@
"lodash.set": "^4.3.2",
"mini-css-extract-plugin": "^1.2.1",
"mustache": "^4.0.1",
"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 @@ -99,6 +106,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 @@ -127,6 +136,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 c67aaa4

Please sign in to comment.