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

refactor authentication and user modules to typescript #237

Draft
wants to merge 183 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
183 commits
Select commit Hold shift + click to select a range
1aff49a
[service] doc comment typo
restjohn Jul 8, 2024
0fbf839
[service] line error on user routes
restjohn Jul 8, 2024
8069148
change postinstall script entry in root package to install:clean
restjohn Jul 8, 2024
948d5cd
[service] users next: wip: move users schema elements from model to m…
restjohn Jul 10, 2024
035b21d
[service] users next: remove `status` field from users schema and rel…
restjohn Jul 10, 2024
cd90692
[service] users next: add missing properties to user entity
restjohn Jul 11, 2024
b2c5bfc
[service] users next: remove unused import
restjohn Jul 11, 2024
5b7e2c4
[service] users next: add comments with todo notes
restjohn Jul 11, 2024
bc40e15
[service] users next: add comments with todo notes
restjohn Jul 12, 2024
a1fc00f
[service] users next: rename authn index module to typescript file
restjohn Jul 16, 2024
e932e37
[service] users next: minor formatting and todo comment
restjohn Jul 16, 2024
0effde5
[service] users next: rename authn verification module to typescript …
restjohn Jul 16, 2024
fa38816
[service] users next: port verification jwt module to typescript
restjohn Jul 17, 2024
a994cb5
[service] users next: rename token model to typescript file
restjohn Jul 19, 2024
356f329
[service] users next: fixing types in token model module
restjohn Jul 23, 2024
2b57aa7
[service] users next: rename token model module to db adapter scheme
restjohn Jul 23, 2024
e4daebe
[service] users next: add passport bearer types
restjohn Jul 23, 2024
5126cf2
[service] users next: rename token model (not collection) to session …
restjohn Jul 24, 2024
66b2a07
[service] users next: remove attrs type parameter on base mongoose re…
restjohn Jul 25, 2024
ae9775b
[service] users next: correct type defs in feeds and icons mongoose a…
restjohn Jul 26, 2024
71d1a92
[service] users next: allow partial mapped doc type value in base mon…
restjohn Jul 26, 2024
ecb76c1
[service] users next: sync types in plugin state mongoose adapter to …
restjohn Jul 26, 2024
73959e9
[service] users next: add doc comment note about casting _id in mongo…
restjohn Jul 26, 2024
1d549a9
[service] users next: sync types in mage event mongoose adapter to pr…
restjohn Jul 26, 2024
78c6ffb
[service] users next: more mage event types
restjohn Jul 29, 2024
6cdc130
[service] users next: fix lint errors
restjohn Jul 29, 2024
71f5708
[service] users next: mongoose types in base mongoose adapter test
restjohn Jul 29, 2024
301ee0c
[service] users next: remove unnecessary any cast in feeds mongoose a…
restjohn Jul 29, 2024
b4c19f2
[service] mongoose types: fixing observation repo
restjohn Aug 2, 2024
5d041f1
[service] mongoose types: fixing observation repo
restjohn Aug 3, 2024
e5d5543
[service] users next: add user to domain terms
restjohn Aug 3, 2024
3529f82
refactor(service/observations): remove unused legacy model and api me…
restjohn Aug 3, 2024
f473088
lint(service): fix type lint warnings in main module
restjohn Aug 3, 2024
9592451
chore(service): transition observation read by id operation to DI arc…
restjohn Aug 4, 2024
84ba2e5
fix!(service): allow plugin state repo put operation to accept and re…
restjohn Aug 4, 2024
3172492
chore(service): hook up read observation operation in main app module
restjohn Aug 5, 2024
2ca4f77
docs(service): add deprecation docs for absolute urls
restjohn Aug 5, 2024
de0c152
style(service): update syntax in geoJsonFormat module
restjohn Aug 6, 2024
fc2694c
style(service): unused import
restjohn Aug 6, 2024
526a88d
fix(service): observation state name was supposed to be `archive`, no…
restjohn Aug 6, 2024
a2474e5
chore(service): remove unreferenced legacy attachment api code
restjohn Aug 6, 2024
31f79fb
refactor(service): migrate read observations rest api to DI adapter l…
restjohn Aug 7, 2024
4aa5b8c
refactor(service): delete unused observation update functions
restjohn Aug 10, 2024
955a5c1
refactor(service): implementations for querying observations
restjohn Aug 12, 2024
52b3a00
refactor(service): add bbox support to observation query; change favo…
restjohn Aug 12, 2024
9915890
refactor(service): devices typescript/di: create device entity module
restjohn Aug 15, 2024
f70cad2
refactor(service): devices typescript/di: create device mongoose repo…
restjohn Aug 15, 2024
3ededc0
style(service): paging api code style
restjohn Aug 16, 2024
5b75495
refactor(service): users-next: export payload type from toke verifica…
restjohn Aug 16, 2024
9ccb2de
docs(service): add doc comment to query paging utility
restjohn Aug 16, 2024
0a82f4f
refactor(service): devices typescript/di: add test placeholder for de…
restjohn Aug 16, 2024
bb77eb4
refactor(service): devices typescript/di: rename device routes to ada…
restjohn Aug 16, 2024
3edff9a
refactor(service)!: devices typescript/di: remove deprecated legacy d…
restjohn Aug 17, 2024
c8cee20
refactor(service): remove mongoose document extension from role docum…
restjohn Aug 18, 2024
8c68e53
refactor(service): remove old authentication entity types
restjohn Aug 18, 2024
8842c42
refactor(service)!: devices typescript/di: add device entities and pe…
restjohn Aug 18, 2024
264bb74
refactor(service): devices typescript/di: implement device web contro…
restjohn Aug 20, 2024
05da690
refactor(web-app): devices typescript/di: remove unnecessary sort par…
restjohn Aug 20, 2024
aaeb23c
refactor(service): devices typescript/di: add user id constraint to m…
restjohn Aug 20, 2024
0b931d5
refactor(service): devices typescript/di: remove associated sessions …
restjohn Aug 21, 2024
069400e
refactor(service): devices typescript/di: remove associated sessions …
restjohn Aug 21, 2024
f4198cb
refactor(service): devices typescript/di: add todo comment
restjohn Aug 21, 2024
aab463a
refactor(service): devices typescript/di: add functional test stubs f…
restjohn Aug 21, 2024
73fd383
style(service): type lint error
restjohn Aug 21, 2024
92fa8cb
chore(service): changelog updates
restjohn Aug 21, 2024
f763f99
refactor(service): users typescript/di: add todo comment
restjohn Aug 21, 2024
f637dfa
refactor(service): users typescript/di: move device functional tests …
restjohn Aug 21, 2024
448d8d3
refactor(service): users typescript/di: remove unreferenced factory f…
restjohn Aug 21, 2024
22ab9a6
refactor(service): users typescript/di: update todo comment
restjohn Aug 21, 2024
bbbabff
refactor(service): users/auth: progress commit
restjohn Aug 28, 2024
d26fe11
refactor(service)!: users/auth: remove deprecated devices/authorizati…
restjohn Aug 28, 2024
421d9d0
refactor(service): users/auth: rename authentication folder to ingres…
restjohn Aug 28, 2024
5721387
refactor(service): remove unsupported observation query fields `field…
restjohn Aug 28, 2024
dd0f333
refactor(service): users/auth: return deleted session from repository…
restjohn Aug 28, 2024
27a8c80
refactor(service): users/auth: improve user entity docs and add user …
restjohn Aug 28, 2024
0330bcf
refactor(service): users/auth: some todo notes
restjohn Sep 5, 2024
8b0624c
refactor(service): users/auth: remove deprecated routes from saml aut…
restjohn Sep 5, 2024
085dff2
refactor(service): users/auth: rename protocol js module files to typ…
restjohn Sep 5, 2024
313475f
refactor(service): users/auth: add passport-local types dependency
restjohn Sep 6, 2024
b0a660a
refactor(service): users/auth: add username lookup to user repository
restjohn Sep 6, 2024
9759fcd
refactor(service): users/auth: add doc comment to base mongoose repos…
restjohn Sep 7, 2024
f67dd4f
refactor(service): users/auth: wip: oauth2 typescript transition
restjohn Sep 9, 2024
37e8f77
refactor(service): users/auth: oauth protocol white space
restjohn Sep 9, 2024
cfc9a5a
refactor(service): users/auth: wip: oauth2 typescript transition: add…
restjohn Sep 9, 2024
9a3b0ab
style(service): users/auth: wip: oauth2 typescript: white space and t…
restjohn Sep 9, 2024
333bcb5
style(service): users/auth: wip: oauth2 typescript: more cleanup
restjohn Sep 10, 2024
3a818fa
style(service): users/auth: wip: remove unused imports and other cleanup
restjohn Sep 11, 2024
e9e3b09
refactor(service): users/auth: wip: rename authentication entities mo…
restjohn Sep 11, 2024
0018ee5
style(service): users/auth: fix renamed references in devices web con…
restjohn Sep 11, 2024
10501f7
style(service): users/auth: comment on authentication model
restjohn Sep 11, 2024
54f1292
refactor(service): users/auth: rename authentication db adapter to se…
restjohn Sep 11, 2024
8c47475
refactor(service): users/auth: move authentication configuration mode…
restjohn Sep 12, 2024
82be3fd
refactor(service): users/auth: move authentication model to ingress l…
restjohn Sep 12, 2024
e224d8a
refactor(service): users/auth: add local idp mongoose repository stub
restjohn Sep 12, 2024
88eee2a
refactor(service): users/auth: remove obsolete user model functions
restjohn Sep 12, 2024
21b9d7f
refactor(service): users/auth: remove references to user icon type pr…
restjohn Sep 13, 2024
17a80ce
refactor(service): users/auth: add todo tag comments for removing leg…
restjohn Sep 13, 2024
2f28e37
refactor(service): users/auth: remove references to user icon type pr…
restjohn Sep 13, 2024
e94be62
refactor(service): users/auth: move password utilities to typescript
restjohn Sep 16, 2024
ea2527a
refactor(service): users/auth: password hash utility typescript conve…
restjohn Sep 17, 2024
aa58e7e
style(service): white space
restjohn Sep 17, 2024
6b5f4cd
refactor(service): users/auth: export default password hash utility
restjohn Sep 17, 2024
463d221
refactor(service): users/auth: password policy utility typescript tra…
restjohn Sep 17, 2024
bf1f2b0
refactor(service): users/auth: add local idp entities
restjohn Sep 17, 2024
a9cc5a8
refactor(service): users/auth: move old pbkdf2 test to typescript file
restjohn Sep 18, 2024
ae99dd5
refactor(service): users/auth: convert password hash js to typescript
restjohn Sep 18, 2024
65ac78b
refactor(service): users/auth: add todo comment on old test
restjohn Sep 18, 2024
e6988d7
refactor(service): users/auth: implement identity provider repository
restjohn Sep 19, 2024
422e6d5
fix(service): add this context to mongodb migration functions
restjohn Sep 23, 2024
9ad2d68
refactor(service): users/auth: progress commit: local signup web rout…
restjohn Sep 25, 2024
1dd2c22
refactor(service): users/auth: no need to extend app request for loca…
restjohn Sep 25, 2024
5480013
refactor(service): users/auth: local auth protocol mostly implemented
restjohn Oct 2, 2024
d4af596
refactor(service): users/auth: implement create local idp account ope…
restjohn Oct 2, 2024
09888d7
refactor(service): users/auth: remove unnecessary error from create l…
restjohn Oct 2, 2024
8ae412b
refactor(service): users/auth: align identity provider document to en…
restjohn Oct 10, 2024
679db00
refactor(service): users/auth: add function to create an enrollment c…
restjohn Oct 15, 2024
6107f7c
refactor(service): users/auth: ensure user account idp bindings on ad…
restjohn Oct 23, 2024
94fccfc
refactor(service): users/auth: progress on ingress web controller
restjohn Oct 23, 2024
ce94d64
refactor(service): users/auth: cleanup comments
restjohn Oct 23, 2024
8251bc8
refactor(service): users/auth: strongly type the permissions list in …
restjohn Oct 23, 2024
d742293
refactor(service): users/auth: better semantic names for jwt token as…
restjohn Oct 23, 2024
7d6f46f
refactor(service): users/auth: user admission test stubs
restjohn Oct 23, 2024
87b7efb
refactor(service): users/auth: cleanup local enrollment web flow type…
restjohn Oct 25, 2024
4a6ff26
refactor(service): users/auth: cleanup local auth protocol handler na…
restjohn Oct 28, 2024
f5830a8
refactor(service): users/auth: migrate old oauth strategy to new prot…
restjohn Oct 28, 2024
29db301
refactor(service): users/auth: remove unused types
restjohn Oct 29, 2024
6e53f18
refactor(service): users/auth: port some init code in app.ts to new u…
restjohn Oct 31, 2024
ed9a1b1
refactor(service): users/auth: change app response class to typedef t…
restjohn Oct 31, 2024
01c01c8
refactor(service): users/auth: change default generic parameter type …
restjohn Oct 31, 2024
8425fcc
style(service): users/auth: remove obsolete comment
restjohn Oct 31, 2024
9284652
refactor(service): users/auth: limit update attributes of identity pr…
restjohn Oct 31, 2024
2142181
refactor(service): users/auth: extract common enrollment function to …
restjohn Oct 31, 2024
2eb9527
refactor(service): users/auth: better name for paging links function
restjohn Nov 3, 2024
500ff6d
refactor(service): users/auth: add some functionality to user ingress…
restjohn Nov 4, 2024
1ce7295
refactor(service): users/auth: remove unused ingress db adapter module
restjohn Nov 4, 2024
ff7ec53
refactor(service): users/auth: fix references to refactored names
restjohn Nov 4, 2024
1cbd6fc
refactor(service): users/auth: rename identity providers db adapter m…
restjohn Nov 5, 2024
b98e722
refactor(service): users/auth: rename session repository factory func…
restjohn Nov 5, 2024
70999cd
refactor(service): users/auth: remove passport bearer middleware from…
restjohn Nov 5, 2024
4e99069
refactor(service): users/auth: remove user and role mongoose model re…
restjohn Nov 5, 2024
fa66fa5
refactor(service): users/auth: add discriminated union for express pa…
restjohn Nov 5, 2024
3fd21f5
refactor(service): users/auth: event routes returns a new router inst…
restjohn Nov 5, 2024
8fd977f
refactor(service): users/auth: move legacy events web routes to adapt…
restjohn Nov 5, 2024
8c109cb
refactor(service): users/auth: delete old user transformer module
restjohn Nov 5, 2024
c3b4d2e
refactor(service): users/auth: pass only user id vs user instance to …
restjohn Nov 7, 2024
7c17eef
refactor(service): users/auth: move passport idp web user typedef to …
restjohn Nov 9, 2024
0216d1e
refactor(service): users/auth: rename session repository methods for …
restjohn Nov 9, 2024
f6bc413
fix(service): db migration context log method was incorrectly typed
restjohn Nov 9, 2024
3c6afa4
refactor(service): users/auth: fix imports in local idp db adapter
restjohn Nov 9, 2024
efd7d65
refactor(service): users/auth: add types for passport-openidconnect
restjohn Nov 9, 2024
52aa863
refactor(service): users/auth: handle state across external protocol …
restjohn Nov 14, 2024
1794201
refactor(service): users/auth: migrate oidc ingress protocol to trype…
restjohn Nov 14, 2024
3acf16b
refactor(service): users/auth: call next middleware in oauth ingress …
restjohn Nov 14, 2024
1f82c17
refactor(service): users/auth: migrate saml ingress protocol to trype…
restjohn Nov 15, 2024
57f8bb2
refactor(service): users/auth: rename some session repository methods…
restjohn Nov 15, 2024
8d92ae4
refactor(service): users/auth: refactor some app level logic to inter…
restjohn Nov 22, 2024
d5c42f1
refactor(web-app): users/auth: fix renamed property on saml settings ui
restjohn Nov 22, 2024
54d4f59
refactor(service): users/auth: remove optional flag on request idp us…
restjohn Nov 22, 2024
8ec3609
refactor(service): users/auth: migrate ldap protocol to new ingress s…
restjohn Nov 22, 2024
8c0b19f
refactor(service): users/auth: fix user reference in legacy access ut…
restjohn Nov 22, 2024
396447d
refactor(service): users/auth: fix type errors in export routes
restjohn Nov 22, 2024
9cc3ea1
refactor(service): users/auth: fix type errors in export modules and …
restjohn Nov 22, 2024
bf4e5c1
refactor(service): users/auth: delete unused anonymous ingress protocol
restjohn Nov 22, 2024
04bd2e4
refactor(service): users/auth: move local idp app layer operations to…
restjohn Nov 25, 2024
606be37
refactor(service): users/auth: more specific names for ingress protoc…
restjohn Nov 25, 2024
af1da75
refactor(service): users/auth: add main module for ingress initializa…
restjohn Nov 25, 2024
b79a80a
refactor(service): users/auth: add app operation stubs to delete iden…
restjohn Nov 25, 2024
695b405
refactor(service): users/auth: migrating user repository - implement …
restjohn Nov 28, 2024
60a97a0
refactor(service): users/auth: fix admission token reference on ingre…
restjohn Nov 29, 2024
ac166f9
refactor(service): users/auth: renames for consistency
restjohn Nov 30, 2024
4236c0e
refactor(service): users/auth: reconcile passport types in ingress pr…
restjohn Nov 30, 2024
a41d0fb
refactor(service): users/auth: moving initialization from ingress ind…
restjohn Nov 30, 2024
ac84fef
refactor(service): users/auth: ingress readme
restjohn Dec 1, 2024
0f0d5cc
refactor(service): users/auth: migrations
restjohn Dec 1, 2024
764f918
refactor(service): users/auth: renamed session repository methods
restjohn Dec 1, 2024
08a1dc7
refactor(service): users/auth: mongoose readme
restjohn Dec 1, 2024
ae54610
refactor(service): users/auth: role database type changes
restjohn Dec 1, 2024
12e9776
refactor(service): users/auth: change property on return types
restjohn Dec 1, 2024
484b3ec
refactor(service): users/auth: user operations types
restjohn Dec 1, 2024
3270eba
refactor(service): users/auth: add todo note
restjohn Dec 1, 2024
6740997
refactor(service): users/auth: remove unnecessary express session mid…
restjohn Dec 1, 2024
9eb6d42
refactor(service): users/auth: remove unnecessary passport initialize…
restjohn Dec 1, 2024
7c7bbb3
refactor(service): users/auth: add todo notes
restjohn Dec 1, 2024
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
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,23 @@ MAGE adheres to [Semantic Versioning](http://semver.org/).
- The `MAGE_MONGO_TLS_INSECURE` env var avoids issues with [self-signed certs](https://github.com/Automattic/mongoose/issues/9147).
- [GARS](https://github.com/ngageoint/gars-js) grid overlay
- [MGRS](https://github.com/ngageoint/mgrs-js) grid overlay
- Add support for sorting observations by `timestamp`: `GET /api/observations?sort=timestamp+(asc|desc)`

##### Bug fixes
- Single observation download bug
- Protect against disabling all authentications.
- Problem with OAuth web login

##### Benign API Changes
- `/api/events/{eventId}/observations`
- Remove support for `geometry` query parameter
- Remove support for `fields` query parameter
- `/api/events/{eventId}/observations/{observationId}`
- Remove support for unnecessary observation query parameters
- `/api/devices`
- Remove support for `sort` query parameter
- Remove support for `expand` query parameter

## [6.2.12](https://github.com/ngageoint/mage-server/releases/tag/6.2.12)
### Service
#### Security
Expand Down
38 changes: 38 additions & 0 deletions docs/development/mongoose.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Mongoose Development Guidelines and Patterns

## Types
* DocType vs. Entity
* Entity with JsonObject mapped to DocType causes TS error
_Type instantiation is excessively deep and possibly infinite.ts(2589)_
because of JsonObject recursive type definition
```
export type FeedServiceDocument = Omit<FeedService, 'id' | 'serviceType'> & {
_id: mongoose.Types.ObjectId
serviceType: mongoose.Types.ObjectId
// config: any
}
export type FeedServiceModel = Model<FeedServiceDocument>
export const FeedServiceSchema = new mongoose.Schema<FeedServiceDocument, FeedServiceModel>(
{
serviceType: { type: mongoose.SchemaTypes.ObjectId, required: true, ref: FeedsModels.FeedServiceTypeIdentity },
title: { type: String, required: true },
summary: { type: String, required: false },
config: { type: Object, required: false },
},
{
toJSON: {
getters: true,
versionKey: false,
transform: (doc: FeedServiceDocument, json: any & FeedService): void => {
delete json._id
json.serviceType = doc.serviceType.toHexString()
}
}
})
```

```
var o: ObservationDocument = null
var l: mongoose.LeanDocument<ObservationDocument> = null
o = l
```
7 changes: 5 additions & 2 deletions docs/domain.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ Many MAGE customers have enterprise data sources available to them that are rele

## Core Terms

### User
A user is a human that interacts with the Mage application to support or accomplish a business goal.

### Feature
A feature represents a physical object or occurrence that has spatial and/or temporal attributes. A spatial attribute is the geographic location and shape of a feature and includes single points, (e.g. latitude and longitude), and geographic geometry structures such as lines and polygon shapes. A temporal attribute could be a single instantaneous timestamp (e.g., 1 January 2020 at 10:35:40.555 AM) or a temporal duration (e.g., 2020-01-01 through 2020-01-31). See **feature** from https://www.ogc.org/ogc/glossary/f.

Expand Down Expand Up @@ -97,13 +100,13 @@ An event is a scope to manage users, the data they collect, and the data they ar
An event defines the observation data participants can submit. Events may define one or more forms into which participants enter observation data about a subject. Each form defines one or more form fields of varying types into which a participant enters a data value of the field's type, such as a date, text, number, email, etc. An event may impose validation rules on submitted observations, such as minimum and/or maximum number of entries for a given form. Form fields may impose validation rules on individual data values, such as required vs. optional, minimum and/or maximum numeric values, text input patterns, or allowed attachment media types.

### Participant
A participant is a user that has access to the data associated with a specific event, as well as to submit observations for the event.
A participant is a user that has access to the data associated with a specific event, as well as access to submit observations for the event.

### Field Participant
A field participant is a participant of an event that is actively collecting observations for the event using a mobile device.

### Monitor
A monitor is a participant of an event that is not actively collecting data for the event in the field.
A monitor is a user that has access to view data associated with an event, but not to create or modify data for the event.

### Location
A location is the reported geospatial position of a field participant. Locations, therefore, only exist within the scope of an event.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"version": "6.3.0-beta.6",
"files": [],
"scripts": {
"postinstall": "npm-run-all service:ci web-app:ci image.service:ci nga-msi:ci",
"install:clean": "npm-run-all service:ci web-app:ci image.service:ci nga-msi:ci",
"install:resolve": "npm-run-all service:install web-app:install image.service:install nga-msi:install",
"build": "npm-run-all service:build web-app:build image.service:build nga-msi:build instance:build",
"pack-all": "npm-run-all service:pack web-app:pack image.service:pack nga-msi:pack",
Expand Down
39 changes: 39 additions & 0 deletions service/functionalTests/security/devices.security.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import { expect } from 'chai'

describe('device management security', function() {

describe('removing a device', function() {

it('invalidates associated sessions', async function() {
expect.fail('todo')
})

it('prevents the owning user from authenticating with the device', async function() {
expect.fail('todo')
})
})

/**
* AKA, set `registered` to `false`.
*/
describe('disabling a device', function() {

it('invalidates associated sessions', async function() {
expect.fail('todo')
})

it('prevents the owning user from authenticating with the device', async function() {
expect.fail('todo')
})
})

/**
* AKA, approving; set `registered` to `true`.
*/
describe('enabling', function() {

it('allows the owning user to authenticate with the device', async function() {
expect.fail('todo')
})
})
})
15 changes: 15 additions & 0 deletions service/functionalTests/security/users.security.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { expect } from 'chai'

describe('user management security', function() {

describe('disabling a user account', function() {

it('prevents the user from authenticating', async function() {
expect.fail('todo')
})

it('invalidates associated sessions', async function() {
expect.fail('todo')
})
})
})
139 changes: 139 additions & 0 deletions service/npm-shrinkwrap.json

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

6 changes: 6 additions & 0 deletions service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
"@fluffy-spoon/substitute": "^1.196.0",
"@types/archiver": "^5.3.4",
"@types/async": "^3.0.5",
"@types/base-64": "^1.0.2",
"@types/bson": "^1.0.11",
"@types/busboy": "^1.5.0",
"@types/chai": "^4.2.19",
Expand All @@ -99,12 +100,17 @@
"@types/express-serve-static-core": "~4.17.0",
"@types/fs-extra": "^8.0.1",
"@types/json2csv": "~4.5.0",
"@types/jsonwebtoken": "^9.0.6",
"@types/lodash": "^4.17.6",
"@types/mocha": "^7.0.2",
"@types/multer": "^1.4.7",
"@types/node": "^18.18.4",
"@types/node-fetch": "^2.5.4",
"@types/passport": "^1.0.3",
"@types/passport-http-bearer": "^1.0.41",
"@types/passport-local": "^1.0.38",
"@types/passport-oauth2": "^1.4.17",
"@types/passport-openidconnect": "^0.1.3",
"@types/sinon": "^9.0.4",
"@types/sinon-chai": "^3.2.4",
"@types/superagent": "^8.1.3",
Expand Down
Loading
Loading