A way for visitors to the national park with KWS parks rules & regulations including a map of the park.
Please note that the information here is purely technical!
This is spring boot 3.0 microservice project which uses MongoDB as its datasource.
The database name is kws_regulations_sys which is secured with the developer & kwsClient roles.
The following is a description for the collections existing in the database as of now.
Primary use is for IAM features.
The following is the accurate description of validation rules used.
{
$jsonSchema: {
bsonType: 'object',
required: [
'name',
'phone',
'role',
'username',
'password',
'isAuthenticated',
'isAuthorised'
],
properties: {
name: {
bsonType: 'string',
description: 'The fullname should be a string'
},
phone: {
bsonType: 'string',
description: 'The phone number should be a string'
},
role: {
bsonType: 'string',
'enum': [
'ADMIN',
'GATE',
'PATROL'
],
description: 'Valid roles are Admin, Gate & Patrol. Check with developer on this'
},
username: {
bsonType: 'string'
},
password: {
bsonType: 'string'
},
isAuthenticated: {
bsonType: 'bool',
description: 'The authentication status should be a boolean'
},
isAuthorised: {
bsonType: 'bool',
description: 'The authorization status should be a boolean'
}
}
},
$and: [
{
name: {
$nin: [
null,
''
]
},
phone: {
$nin: [
null,
''
]
},
role: {
$nin: [
null,
''
]
},
username: {
$nin: [
null,
''
]
},
password: {
$nin: [
null,
''
]
},
isAuthenticated: {
$nin: [
null
]
},
isAuthorised: {
$nin: [
null
]
}
}
]
}
Records of http listener audit events.
Records of customers who have visited the park.
The following is the accurate description of validation rules used.
{
$jsonSchema: {
bsonType: 'object',
required: [
'timestamp',
'session',
'plates',
'passengers',
'phone',
'account'
],
properties: {
timestamp: {
bsonType: 'date'
},
session: {
bsonType: 'string',
'enum': [
'MORNING',
'EVENING',
'FULL_DAY'
],
description: 'Valid sessions are Morning, Evening & Full day. Check with developer on this'
},
plates: {
bsonType: 'string'
},
passengers: {
bsonType: 'int'
},
phone: {
bsonType: 'string',
description: 'The phone number should be a string'
},
account: {
bsonType: 'object',
required: [
'name',
'phone',
'role',
'username'
],
properties: {
name: {
bsonType: 'string',
description: 'The fullname should be a string'
},
phone: {
bsonType: 'string',
description: 'The phone number should be a string'
},
role: {
bsonType: 'string',
'enum': [
'ADMIN',
'GATE',
'PATROL'
],
description: 'Valid roles are Admin, Gate & Patrol. Check with developer on this'
},
username: {
bsonType: 'string'
}
}
}
}
},
$and: [
{
timestamp: {
$nin: [
null
]
},
session: {
$nin: [
null,
''
]
},
plates: {
$nin: [
null,
''
]
},
passengers: {
$nin: [
null
],
$gt: 0
},
phone: {
$nin: [
null,
''
]
},
account: {
$nin: [
null
]
}
}
]
}
Records of generated OTPS with the user to whom it was generated for.
The following is the accurate description of validation rules used
{
$jsonSchema: {
required: [
'passwordCode',
'accountId',
'expiry',
'deactivated'
],
properties: {
passwordCode: {
bsonType: 'int'
},
accountId: {
bsonType: 'binData'
},
expiry: {
bsonType: 'date'
},
deactivated: {
bsonType: 'bool'
}
}
},
$and: [
{
passwordCode: {
$nin: [
0,
null
]
},
accountId: {
$nin: [
null
]
},
expiry: {
$nin: [
null
]
},
deactivated: {
$nin: [
null
]
}
}
]
}