diff --git a/backend/src/app.js b/backend/src/app.js index 14327f89..0bfef122 100644 --- a/backend/src/app.js +++ b/backend/src/app.js @@ -45,6 +45,7 @@ const edxRouter = require('./routes/edx-router'); const instituteRouter = require('./routes/institute'); const sdcRouter = require('./routes/sdc'); const cacheRouter = require('./routes/cache-router'); +const easRouter = require('./routes/eas'); const promMid = require('express-prometheus-middleware'); const Redis = require('./util/redis/redis-client'); Redis.init(); // call the init to initialize appropriate client, and reuse it across the app. @@ -214,6 +215,7 @@ apiRouter.use('/edx', edxRouter); apiRouter.use('/institute', instituteRouter); apiRouter.use('/sdc', sdcRouter); apiRouter.use('/cache', cacheRouter); +apiRouter.use('/eas', easRouter); // Prevent unhandled errors from crashing application process.on('unhandledRejection', err => { log.error(err.stack); diff --git a/backend/src/components/eas/eas.js b/backend/src/components/eas/eas.js new file mode 100644 index 00000000..42ac8105 --- /dev/null +++ b/backend/src/components/eas/eas.js @@ -0,0 +1,43 @@ +'use strict'; +const { logApiError, getData, errorResponse, handleExceptionResponse } = require('../utils'); +const HttpStatus = require('http-status-codes'); +const utils = require('../utils'); + +const config = require('../../config'); + +async function getAssessmentSessions(req, res) { + try { + const url = `${config.get('server:eas:assessmentSessionsURL')}`; + const data = await getData(url); + return res.status(200).json(data); + } catch (e) { + logApiError(e, 'getAssessmentSessions', 'Error occurred while attempting to GET assessment sessions.'); + return handleExceptionResponse(e, res); + } +} + +async function updateAssessmentSession(req, res) { + if (req.params.sessionID !== req.body.sessionID) { + return res.status(HttpStatus.BAD_REQUEST).json({ + message: 'The sessionID in the URL didn\'t match the sessionID in the request body.' + }); + } + try { + const userInfo = utils.getUser(req); + const payload = { + sessionID: req.body.sessionID, + activeFromDate: req.body.activeFromDate, + activeUntilDate: req.body.activeUntilDate, + updateUser: userInfo.idir_username + }; + const result = await utils.putData(`${config.get('server:eas:assessmentSessionsURL')}/${req.body.sessionID}`, payload, utils.getUser(req).idir_username); + return res.status(HttpStatus.OK).json(result); + } catch (e) { + logApiError(e, 'updateAssessmentSession', 'Error occurred while attempting to save the changes to the assessment session.'); + return errorResponse(res); + } +} +module.exports = { + getAssessmentSessions, + updateAssessmentSession +}; diff --git a/backend/src/components/utils.js b/backend/src/components/utils.js index d69825f9..f3644bf6 100644 --- a/backend/src/components/utils.js +++ b/backend/src/components/utils.js @@ -96,12 +96,12 @@ function formatNumberOfCourses(value) { function handleExceptionResponse(e, res) { if (e.message === '404' || e.status === '404' || e.status === 404) { return res.status(HttpStatus.NOT_FOUND).json(); - } else if(e.message === '403') { + } else if(e.message === '403' || e.status === 403) { return res.status(HttpStatus.FORBIDDEN).json({ status: HttpStatus.FORBIDDEN, message: 'You do not have permission to access this information' }); - } else if(e.message === '401'){ + } else if(e.message === '401' || e.status === 401){ return res.status(HttpStatus.UNAUTHORIZED).json({ status: HttpStatus.UNAUTHORIZED, message: 'Token is not valid' diff --git a/backend/src/config/index.js b/backend/src/config/index.js index 82e64b42..c25724d9 100644 --- a/backend/src/config/index.js +++ b/backend/src/config/index.js @@ -186,7 +186,8 @@ nconf.defaults({ bannerColor: process.env.BANNER_COLOR, webSocketURL: process.env.WEB_SOCKET_URL, disableSdcFunctionality: process.env.DISABLE_SDC_FUNCTIONALITY === 'true', - edxURL: process.env.EDX_URL + edxURL: process.env.EDX_URL, + disableEASFunctionality: process.env.DISABLE_EAS_FUNCTIONALITY ? process.env.DISABLE_EAS_FUNCTIONALITY === 'true' : true }, sdc: { rootURL: process.env.SDC_API_URL, @@ -214,6 +215,10 @@ nconf.defaults({ programEligibilityTypeCodesURL: process.env.SDC_API_URL + '/program-eligibility-issue-codes', zeroFteReasonCodesURL: process.env.SDC_API_URL + '/zero-fte-reason-codes', sdcDuplicateURL: process.env.SDC_API_URL + '/sdc-duplicate' + }, + eas:{ + rootURL: process.env.EAS_URL, + assessmentSessionsURL: process.env.EAS_URL+ '/sessions', } }); module.exports = nconf; diff --git a/backend/src/routes/config.js b/backend/src/routes/config.js index 3437d030..db9e582a 100644 --- a/backend/src/routes/config.js +++ b/backend/src/routes/config.js @@ -14,7 +14,8 @@ async function getConfig(req, res) { BANNER_COLOR: frontendConfig.bannerColor, WEB_SOCKET_URL: frontendConfig.webSocketURL, DISABLE_SDC_FUNCTIONALITY: frontendConfig.disableSdcFunctionality, - EDX_URL: frontendConfig.edxURL + EDX_URL: frontendConfig.edxURL, + DISABLE_EAS_FUNCTIONALITY: 'disableEASFunctionality' in frontendConfig ? frontendConfig.disableEASFunctionality : true }; return res.status(HttpStatus.OK).json(frontConfig); } diff --git a/backend/src/routes/eas.js b/backend/src/routes/eas.js new file mode 100644 index 00000000..11db8ee8 --- /dev/null +++ b/backend/src/routes/eas.js @@ -0,0 +1,15 @@ +const passport = require('passport'); +const express = require('express'); +const router = express.Router(); +const { getAssessmentSessions, updateAssessmentSession } = require('../components/eas/eas'); +const utils = require('../components/utils'); +const extendSession = utils.extendSession(); +const permUtils = require('../components/permissionUtils'); +const perm = require('../util/Permission'); + +const PERMISSION = perm.PERMISSION; + +router.get('/assessment-sessions', passport.authenticate('jwt', {session: false}, undefined), permUtils.checkUserHasPermission(PERMISSION.MANAGE_EAS_SESSIONS_PERMISSION), extendSession, getAssessmentSessions); +router.put('/assessment-sessions/:sessionID', passport.authenticate('jwt', {session: false}, undefined), permUtils.checkUserHasPermission(PERMISSION.MANAGE_EAS_SESSIONS_PERMISSION), extendSession, updateAssessmentSession); + +module.exports = router; diff --git a/backend/src/util/Permission.js b/backend/src/util/Permission.js index bd0028e3..1dc39b22 100644 --- a/backend/src/util/Permission.js +++ b/backend/src/util/Permission.js @@ -16,7 +16,8 @@ const PERMISSION = Object.freeze( STUDENT_DATA_COLLECTION: 'STUDENT_DATA_COLLECTION', REPORTS_SDC_PUBLIC_SCHOOLS_PERMISSION: 'REPORTS_SDC_PUBLIC_SCHOOLS_PERMISSION', REPORTS_SDC_INDEPENDENT_SCHOOLS_PERMISSION: 'REPORTS_SDC_INDEPENDENT_SCHOOLS_PERMISSION', - REPORTS_SDC_HEADCOUNTS_PERMISSION: 'REPORTS_SDC_HEADCOUNTS_PERMISSION' + REPORTS_SDC_HEADCOUNTS_PERMISSION: 'REPORTS_SDC_HEADCOUNTS_PERMISSION', + MANAGE_EAS_SESSIONS_PERMISSION:'MANAGE_EAS_SESSIONS_PERMISSION' } ); diff --git a/frontend/src/components/assessments/AssessmentSessions.vue b/frontend/src/components/assessments/AssessmentSessions.vue new file mode 100644 index 00000000..ac4188c1 --- /dev/null +++ b/frontend/src/components/assessments/AssessmentSessions.vue @@ -0,0 +1,180 @@ + + + diff --git a/frontend/src/components/assessments/sessions/SessionCard.vue b/frontend/src/components/assessments/sessions/SessionCard.vue new file mode 100644 index 00000000..9ccf51b9 --- /dev/null +++ b/frontend/src/components/assessments/sessions/SessionCard.vue @@ -0,0 +1,97 @@ + + + + + diff --git a/frontend/src/components/assessments/sessions/SessionEdit.vue b/frontend/src/components/assessments/sessions/SessionEdit.vue new file mode 100644 index 00000000..3c417001 --- /dev/null +++ b/frontend/src/components/assessments/sessions/SessionEdit.vue @@ -0,0 +1,162 @@ + + + + + diff --git a/frontend/src/components/util/NavBar.vue b/frontend/src/components/util/NavBar.vue index c6c01c34..ee9cbb51 100644 --- a/frontend/src/components/util/NavBar.vue +++ b/frontend/src/components/util/NavBar.vue @@ -324,6 +324,17 @@ export default { title: PAGE_TITLES.DATA_COLLECTION, link: 'sdc-collection', authorized: this.hasRequiredPermission(this.userInfo, PERMISSION.STUDENT_DATA_COLLECTION) + }, + { + title: PAGE_TITLES.ASSESSMENTS, + authorized: !this.config.DISABLE_EAS_FUNCTIONALITY && this.hasRequiredPermission(this.userInfo, PERMISSION.MANAGE_EAS_SESSIONS_PERMISSION), + items: [ + { + title: 'Sessions', + link: 'assessmentsessions', + authorized: this.hasRequiredPermission(this.userInfo, PERMISSION.MANAGE_EAS_SESSIONS_PERMISSION) + } + ], } ]; } diff --git a/frontend/src/router.js b/frontend/src/router.js index e7102635..4b7d5d0d 100644 --- a/frontend/src/router.js +++ b/frontend/src/router.js @@ -52,6 +52,7 @@ import ActiveCollectionPage from '@/components/data-collection/ActiveCollectionP import EDXInvitations from '@/components/secure-message/EDXInvitations.vue'; import CollectionView from '@/components/data-collection/CollectionView.vue'; import PenMatchStudentDetails from '@/components/data-collection/PenMatchStudentDetails.vue'; +import AssessmentSessions from '@/components/assessments/AssessmentSessions.vue'; const router = createRouter({ history: createWebHistory(), @@ -496,6 +497,16 @@ const router = createRouter({ } ] }, + { + path: '/assessmentsessions', + name: 'assessmentsessions', + component: AssessmentSessions, + meta: { + pageTitle: PAGE_TITLES.ASSESSMENT_SESSIONS_MANAGEMENT, + requiresAuth: true, + permission: PERMISSION.MANAGE_EAS_SESSIONS_PERMISSION + }, + }, { path: '/authority/:authorityID', name: 'authorityDetails', diff --git a/frontend/src/utils/constants.js b/frontend/src/utils/constants.js index 3d86bed4..dfee4990 100644 --- a/frontend/src/utils/constants.js +++ b/frontend/src/utils/constants.js @@ -18,6 +18,7 @@ const instituteRoot = baseRoot + '/institute'; const cacheRoot = baseRoot + '/cache'; const sdcRoot = baseRoot + '/sdc'; const ministrySDCReportsRoot = baseRoot + '/ministrySDCReports'; +const easRoot = baseRoot + '/eas'; let object = { LOGIN: authRoot + '/login', @@ -203,6 +204,10 @@ let object = { SDC_VALIDATION_ISSUE_TYPE_CODES: sdcRoot + '/validation-issue-type-codes', SDC_PROGRAM_ELIGIBILITY_TYPE_CODES: sdcRoot + '/program-eligibility-issue-codes', SDC_ZERO_FTE_REASON_CODES: sdcRoot + '/zero-fte-reason-codes', + }, + eas: { + BASE_URL: easRoot, + GET_ASSESSMENT_SESSIONS: easRoot + '/assessment-sessions' } }; @@ -590,7 +595,9 @@ export const PAGE_TITLES = Object.freeze( SCHOOL_MOVE: 'School Move', DATA_COLLECTION: 'Data Collection', INVITATIONS: 'EDX Invitations', - CLOSE_COLLECTION: 'Close Collection' + CLOSE_COLLECTION: 'Close Collection', + ASSESSMENTS: 'Assessments', + ASSESSMENT_SESSIONS_MANAGEMENT: 'Assessment Sessions', } ); diff --git a/frontend/src/utils/constants/Permission.js b/frontend/src/utils/constants/Permission.js index b0c8c128..ad50b3ef 100644 --- a/frontend/src/utils/constants/Permission.js +++ b/frontend/src/utils/constants/Permission.js @@ -38,7 +38,9 @@ export const PERMISSION = Object.freeze( REPORTS_SDC_INDEPENDENT_SCHOOLS_PERMISSION: 'REPORTS_SDC_INDEPENDENT_SCHOOLS_PERMISSION', - REPORTS_SDC_HEADCOUNTS_PERMISSION: 'REPORTS_SDC_HEADCOUNTS_PERMISSION' + REPORTS_SDC_HEADCOUNTS_PERMISSION: 'REPORTS_SDC_HEADCOUNTS_PERMISSION', + + MANAGE_EAS_SESSIONS_PERMISSION: 'MANAGE_EAS_SESSIONS_PERMISSION' } ); diff --git a/tools/config/update-configmap.sh b/tools/config/update-configmap.sh index e70beed2..3bd55946 100644 --- a/tools/config/update-configmap.sh +++ b/tools/config/update-configmap.sh @@ -538,6 +538,33 @@ curl -sX POST "https://$SOAM_KC/auth/admin/realms/$SOAM_KC_REALM_ID/roles/STUDEN -H "Authorization: Bearer $TKN" \ -d "[$viewStudentDataCollectionPermissionJson, $editStudentDataCollectionPermissionJson]" +echo +echo Creating MANAGE_EAS_SESSIONS_PERMISSION permission +curl -sX POST "https://$SOAM_KC/auth/admin/realms/$SOAM_KC_REALM_ID/roles" \ + -H "Content-Type: application/json" \ + -H "Authorization: Bearer $TKN" \ + -d "{\"name\" : \"MANAGE_EAS_SESSIONS_PERMISSION\",\"description\" : \"Permission to manage EAS sessions\",\"composite\" : false,\"clientRole\" : false,\"containerId\" : \"$SOAM_KC_REALM_ID\"}" + +echo +echo Retrieving MANAGE_EAS_SESSIONS_PERMISSION permission +manageSessionsPermissionJson=$(curl -sX GET "https://$SOAM_KC/auth/admin/realms/$SOAM_KC_REALM_ID/roles/MANAGE_EAS_SESSIONS_PERMISSION" \ + -H "Content-Type: application/json" \ + -H "Authorization: Bearer $TKN") + +echo +echo Creating EAS_ADMIN role +curl -sX POST "https://$SOAM_KC/auth/admin/realms/$SOAM_KC_REALM_ID/roles" \ + -H "Content-Type: application/json" \ + -H "Authorization: Bearer $TKN" \ + -d "{\"name\" : \"EAS_ADMIN\",\"description\" : \"Allows access to EAS administration\",\"composite\" : false,\"clientRole\" : false,\"containerId\" : \"$SOAM_KC_REALM_ID\"}" + +echo +echo Assigning permissions to EAS_ADMIN role +curl -sX POST "https://$SOAM_KC/auth/admin/realms/$SOAM_KC_REALM_ID/roles/EAS_ADMIN/composites" \ + -H "Content-Type: application/json" \ + -H "Authorization: Bearer $TKN" \ + -d "[$manageSessionsPermissionJson]" + echo echo Retrieving client ID for student-admin-soam studentAdminClientID=$(curl -sX GET "https://$SOAM_KC/auth/admin/realms/$SOAM_KC_REALM_ID/clients" \ @@ -598,14 +625,14 @@ if [[ ("$studentAdminServiceClientSecret" != "" && "$studentAdminServiceClientSe curl -sX POST "https://$SOAM_KC/auth/admin/realms/$SOAM_KC_REALM_ID/clients" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $TKN" \ - -d "{ \"clientId\" : \"student-admin-service\",\"secret\" : \"$studentAdminServiceClientSecret\", \"name\" : \"Student Admin Service Client\", \"description\" : \"Student admin user which logs into SOAM\", \"surrogateAuthRequired\" : false, \"enabled\" : true, \"clientAuthenticatorType\" : \"client-secret\", \"redirectUris\" : [ ], \"webOrigins\" : [ ], \"notBefore\" : 0, \"bearerOnly\" : false, \"consentRequired\" : false, \"standardFlowEnabled\" : false, \"implicitFlowEnabled\" : false, \"directAccessGrantsEnabled\" : false, \"serviceAccountsEnabled\" : true, \"publicClient\" : false, \"frontchannelLogout\" : false, \"protocol\" : \"openid-connect\", \"attributes\" : { \"saml.assertion.signature\" : \"false\", \"saml.multivalued.roles\" : \"false\", \"saml.force.post.binding\" : \"false\", \"saml.encrypt\" : \"false\", \"saml.server.signature\" : \"false\", \"saml.server.signature.keyinfo.ext\" : \"false\", \"exclude.session.state.from.auth.response\" : \"false\", \"saml_force_name_id_format\" : \"false\", \"saml.client.signature\" : \"false\", \"tls.client.certificate.bound.access.tokens\" : \"false\", \"saml.authnstatement\" : \"false\", \"display.on.consent.screen\" : \"false\", \"saml.onetimeuse.condition\" : \"false\" }, \"authenticationFlowBindingOverrides\" : { }, \"fullScopeAllowed\" : true, \"nodeReRegistrationTimeout\" : -1, \"protocolMappers\" : [ ], \"defaultClientScopes\" : [ \"web-origins\", \"role_list\", \"SEND_PEN_REQUEST_EMAIL\", \"WRITE_PEN_REQUEST\", \"profile\", \"roles\", \"email\", \"READ_PEN_REQUEST\", \"READ_PEN_REQUEST_STATUSES\", \"READ_PEN_DEMOGRAPHICS\", \"WRITE_DIGITALID\", \"READ_DIGITALID\", \"WRITE_STUDENT\", \"READ_STUDENT\", \"READ_STUDENT_CODES\", \"READ_DIGITALID_CODETABLE\", \"READ_DOCUMENT\", \"READ_DOCUMENT_TYPES\", \"WRITE_DOCUMENT\", \"READ_SDC_MINISTRY_REPORTS\", \"READ_STUDENT_PROFILE\", \"WRITE_STUDENT_PROFILE\", \"READ_DOCUMENT_STUDENT_PROFILE\", \"WRITE_DOCUMENT_STUDENT_PROFILE\", \"READ_DOCUMENT_TYPES_STUDENT_PROFILE\", \"READ_STUDENT_PROFILE_STATUSES\", \"READ_STUDENT_PROFILE_CODES\", \"SEND_STUDENT_PROFILE_EMAIL\",\"PEN_REQUEST_UNLINK_SAGA\",\"PEN_REQUEST_REJECT_SAGA\",\"READ_SECURE_EXCHANGE_DOCUMENT_REQUIREMENTS\", \"PEN_REQUEST_RETURN_SAGA\",\"PEN_REQUEST_COMPLETE_SAGA\",\"STUDENT_PROFILE_COMPLETE_SAGA\",\"STUDENT_PROFILE_REJECT_SAGA\",\"STUDENT_PROFILE_RETURN_SAGA\", \"READ_PEN_REQUEST_BATCH\", \"READ_PEN_MATCH\", \"WRITE_PEN_REQUEST_BATCH\", \"STUDENT_PROFILE_READ_SAGA\", \"GET_NEXT_PEN_NUMBER\", \"VALIDATE_STUDENT_DEMOGRAPHICS\",\"PEN_REQUEST_BATCH_NEW_PEN_SAGA\",\"PEN_REQUEST_BATCH_USER_MATCH_SAGA\",\"PEN_REQUEST_BATCH_READ_SAGA\", \"READ_VALIDATION_CODES\", \"READ_STUDENT_HISTORY\", \"READ_NICKNAMES\", \"READ_SCHOOL_FUNDING_GROUP_SNAPSHOT\", \"READ_SCHOOL\", \"READ_PEN_TRAX\", \"READ_SLD_STUDENT\",\"WRITE_POSSIBLE_MATCH\",\"DELETE_POSSIBLE_MATCH\",\"READ_POSSIBLE_MATCH\",\"READ_STUDENT_MERGE\" ,\"WRITE_STUDENT_MERGE\",\"READ_STUDENT_MERGE_CODES\",\"STUDENT_MERGE_COMPLETE_SAGA\",\"STUDENT_DEMERGE_COMPLETE_SAGA\",\"PEN_SERVICES_READ_SAGA\",\"READ_PEN_REQUEST_BATCH_BLOB\",\"STUDENT_SPLIT_PEN_SAGA\", \"PEN_REQUEST_BATCH_ARCHIVE_SAGA\", \"PEN_REQUEST_BATCH_REPOST_SAGA\", \"READ_PEN_COORDINATOR\", \"WRITE_PEN_COORDINATOR\", \"READ_PEN_MACRO\", \"WRITE_PEN_MACRO\", \"MACRO_READ_SAGA\",\"READ_PEN_REQUEST_STATS\", \"READ_STUDENT_PROFILE_STATS\", \"STUDENT_MOVE_SLD_SAGA\", \"NOMINAL_ROLL_READ_STUDENT\", \"NOMINAL_ROLL_WRITE_STUDENT\", \"NOMINAL_ROLL_DELETE_STUDENT\", \"NOMINAL_ROLL_UPLOAD_FILE\", \"NOMINAL_ROLL_VALIDATE\", \"NOMINAL_ROLL_POST_DATA_SAGA\", \"NOMINAL_ROLL_READ_SAGA\", \"READ_FED_PROV_CODE\", \"WRITE_FED_PROV_CODE\", \"NOMINAL_ROLL_CREATE_FED_PROV\", \"READ_SECURE_EXCHANGE\", \"WRITE_SECURE_EXCHANGE\", \"READ_SECURE_EXCHANGE_DOCUMENT\", \"WRITE_SECURE_EXCHANGE_DOCUMENT\", \"DELETE_SECURE_EXCHANGE_DOCUMENT\", \"READ_SECURE_EXCHANGE_CODES\", \"READ_SECURE_EXCHANGE_DOCUMENT_TYPES\", \"READ_SECURE_EXCHANGE_STATUSES\", \"READ_MINISTRY_TEAMS\", \"READ_EDX_USER_SCHOOLS\", \"DELETE_SECURE_EXCHANGE\", \"READ_EDX_USERS\", \"READ_PRIMARY_ACTIVATION_CODE\", \"WRITE_EDX_USER_SCHOOL\", \"WRITE_PRIMARY_ACTIVATION_CODE\", \"SCHOOL_USER_ACTIVATION_INVITE_SAGA\", \"CREATE_SECURE_EXCHANGE_SAGA\" , \"DELETE_EDX_USER_SCHOOL\", \"WRITE_EDX_USER_DISTRICT\", \"DELETE_EDX_USER_DISTRICT\", \"CREATE_SECURE_EXCHANGE_COMMENT_SAGA\", \"READ_DISTRICT\", \"WRITE_DISTRICT_CONTACT\", \"DISTRICT_USER_ACTIVATION_INVITE_SAGA\", \"DISTRICT_USER_ACTIVATION_INVITE_SAGA\", \"DELETE_SECURE_EXCHANGE_NOTE\", \"WRITE_SECURE_EXCHANGE_NOTE\", \"READ_SECURE_EXCHANGE_NOTE\", \"DELETE_SECURE_EXCHANGE_COMMENT\", \"WRITE_SECURE_EXCHANGE_COMMENT\", \"READ_SECURE_EXCHANGE_COMMENT\", \"DELETE_SECURE_EXCHANGE_STUDENT\", \"WRITE_SECURE_EXCHANGE_STUDENT\", \"READ_SECURE_EXCHANGE_STUDENT\", \"READ_INSTITUTE_CODES\", \"READ_INDEPENDENT_AUTHORITY\", \"WRITE_INDEPENDENT_AUTHORITY\", \"READ_SCHOOL_NOTE\", \"WRITE_SCHOOL_NOTE\", \"DELETE_SCHOOL_NOTE\", \"WRITE_SCHOOL_CONTACT\", \"WRITE_INDEPENDENT_AUTHORITY_CONTACT\", \"READ_INDEPENDENT_AUTHORITY_NOTE\", \"WRITE_INDEPENDENT_AUTHORITY_NOTE\", \"DELETE_INDEPENDENT_AUTHORITY_NOTE\", \"WRITE_SCHOOL\", \"WRITE_DISTRICT\", \"READ_DISTRICT_NOTE\", \"WRITE_DISTRICT_NOTE\", \"DELETE_DISTRICT_NOTE\", \"READ_SCHOOL_HISTORY\",\"MOVE_SCHOOL_SAGA\", \"CREATE_SCHOOL_SAGA\", \"READ_SCHOOL_CONTACT\", \"READ_DISTRICT_CONTACT\", \"READ_INDEPENDENT_AUTHORITY_CONTACT\", \"READ_SCHOOL_FUNDING_GROUP\", \"WRITE_SCHOOL_FUNDING_GROUP\", \"DELETE_SCHOOL_FUNDING_GROUP\", \"READ_SDC_COLLECTION\", \"READ_SDC_DISTRICT_COLLECTION\", \"READ_COLLECTION_CODES\", \"WRITE_COLLECTION_CODES\", \"WRITE_ACTIVATION_CODE\", \"READ_SDC_SCHOOL_COLLECTION_STUDENT\", \"WRITE_SDC_DISTRICT_COLLECTION\", \"WRITE_SDC_SCHOOL_COLLECTION_STUDENT\", \"WRITE_SDC_COLLECTION\"], \"optionalClientScopes\" : [ \"address\", \"phone\" ], \"access\" : { \"view\" : true, \"configure\" : true, \"manage\" : true } }" + -d "{ \"clientId\" : \"student-admin-service\",\"secret\" : \"$studentAdminServiceClientSecret\", \"name\" : \"Student Admin Service Client\", \"description\" : \"Student admin user which logs into SOAM\", \"surrogateAuthRequired\" : false, \"enabled\" : true, \"clientAuthenticatorType\" : \"client-secret\", \"redirectUris\" : [ ], \"webOrigins\" : [ ], \"notBefore\" : 0, \"bearerOnly\" : false, \"consentRequired\" : false, \"standardFlowEnabled\" : false, \"implicitFlowEnabled\" : false, \"directAccessGrantsEnabled\" : false, \"serviceAccountsEnabled\" : true, \"publicClient\" : false, \"frontchannelLogout\" : false, \"protocol\" : \"openid-connect\", \"attributes\" : { \"saml.assertion.signature\" : \"false\", \"saml.multivalued.roles\" : \"false\", \"saml.force.post.binding\" : \"false\", \"saml.encrypt\" : \"false\", \"saml.server.signature\" : \"false\", \"saml.server.signature.keyinfo.ext\" : \"false\", \"exclude.session.state.from.auth.response\" : \"false\", \"saml_force_name_id_format\" : \"false\", \"saml.client.signature\" : \"false\", \"tls.client.certificate.bound.access.tokens\" : \"false\", \"saml.authnstatement\" : \"false\", \"display.on.consent.screen\" : \"false\", \"saml.onetimeuse.condition\" : \"false\" }, \"authenticationFlowBindingOverrides\" : { }, \"fullScopeAllowed\" : true, \"nodeReRegistrationTimeout\" : -1, \"protocolMappers\" : [ ], \"defaultClientScopes\" : [ \"web-origins\", \"role_list\", \"SEND_PEN_REQUEST_EMAIL\", \"WRITE_PEN_REQUEST\", \"profile\", \"roles\", \"email\", \"READ_PEN_REQUEST\", \"READ_PEN_REQUEST_STATUSES\", \"READ_PEN_DEMOGRAPHICS\", \"WRITE_DIGITALID\", \"READ_DIGITALID\", \"WRITE_STUDENT\", \"READ_STUDENT\", \"READ_STUDENT_CODES\", \"READ_DIGITALID_CODETABLE\", \"READ_DOCUMENT\", \"READ_DOCUMENT_TYPES\", \"WRITE_DOCUMENT\", \"READ_SDC_MINISTRY_REPORTS\", \"READ_STUDENT_PROFILE\", \"WRITE_STUDENT_PROFILE\", \"READ_DOCUMENT_STUDENT_PROFILE\", \"WRITE_DOCUMENT_STUDENT_PROFILE\", \"READ_DOCUMENT_TYPES_STUDENT_PROFILE\", \"READ_STUDENT_PROFILE_STATUSES\", \"READ_STUDENT_PROFILE_CODES\", \"SEND_STUDENT_PROFILE_EMAIL\",\"PEN_REQUEST_UNLINK_SAGA\",\"PEN_REQUEST_REJECT_SAGA\",\"READ_SECURE_EXCHANGE_DOCUMENT_REQUIREMENTS\", \"PEN_REQUEST_RETURN_SAGA\",\"PEN_REQUEST_COMPLETE_SAGA\",\"STUDENT_PROFILE_COMPLETE_SAGA\",\"STUDENT_PROFILE_REJECT_SAGA\",\"STUDENT_PROFILE_RETURN_SAGA\", \"READ_PEN_REQUEST_BATCH\", \"READ_PEN_MATCH\", \"WRITE_PEN_REQUEST_BATCH\", \"STUDENT_PROFILE_READ_SAGA\", \"GET_NEXT_PEN_NUMBER\", \"VALIDATE_STUDENT_DEMOGRAPHICS\",\"PEN_REQUEST_BATCH_NEW_PEN_SAGA\",\"PEN_REQUEST_BATCH_USER_MATCH_SAGA\",\"PEN_REQUEST_BATCH_READ_SAGA\", \"READ_VALIDATION_CODES\", \"READ_STUDENT_HISTORY\", \"READ_NICKNAMES\", \"READ_SCHOOL_FUNDING_GROUP_SNAPSHOT\", \"READ_SCHOOL\", \"READ_PEN_TRAX\", \"READ_SLD_STUDENT\",\"WRITE_POSSIBLE_MATCH\",\"DELETE_POSSIBLE_MATCH\",\"READ_POSSIBLE_MATCH\",\"READ_STUDENT_MERGE\" ,\"WRITE_STUDENT_MERGE\",\"READ_STUDENT_MERGE_CODES\",\"STUDENT_MERGE_COMPLETE_SAGA\",\"STUDENT_DEMERGE_COMPLETE_SAGA\",\"PEN_SERVICES_READ_SAGA\",\"READ_PEN_REQUEST_BATCH_BLOB\",\"STUDENT_SPLIT_PEN_SAGA\", \"PEN_REQUEST_BATCH_ARCHIVE_SAGA\", \"PEN_REQUEST_BATCH_REPOST_SAGA\", \"READ_PEN_COORDINATOR\", \"WRITE_PEN_COORDINATOR\", \"READ_PEN_MACRO\", \"WRITE_PEN_MACRO\", \"MACRO_READ_SAGA\",\"READ_PEN_REQUEST_STATS\", \"READ_STUDENT_PROFILE_STATS\", \"STUDENT_MOVE_SLD_SAGA\", \"NOMINAL_ROLL_READ_STUDENT\", \"NOMINAL_ROLL_WRITE_STUDENT\", \"NOMINAL_ROLL_DELETE_STUDENT\", \"NOMINAL_ROLL_UPLOAD_FILE\", \"NOMINAL_ROLL_VALIDATE\", \"NOMINAL_ROLL_POST_DATA_SAGA\", \"NOMINAL_ROLL_READ_SAGA\", \"READ_FED_PROV_CODE\", \"WRITE_FED_PROV_CODE\", \"NOMINAL_ROLL_CREATE_FED_PROV\", \"READ_SECURE_EXCHANGE\", \"WRITE_SECURE_EXCHANGE\", \"READ_SECURE_EXCHANGE_DOCUMENT\", \"WRITE_SECURE_EXCHANGE_DOCUMENT\", \"DELETE_SECURE_EXCHANGE_DOCUMENT\", \"READ_SECURE_EXCHANGE_CODES\", \"READ_SECURE_EXCHANGE_DOCUMENT_TYPES\", \"READ_SECURE_EXCHANGE_STATUSES\", \"READ_MINISTRY_TEAMS\", \"READ_EDX_USER_SCHOOLS\", \"DELETE_SECURE_EXCHANGE\", \"READ_EDX_USERS\", \"READ_PRIMARY_ACTIVATION_CODE\", \"WRITE_EDX_USER_SCHOOL\", \"WRITE_PRIMARY_ACTIVATION_CODE\", \"SCHOOL_USER_ACTIVATION_INVITE_SAGA\", \"CREATE_SECURE_EXCHANGE_SAGA\" , \"DELETE_EDX_USER_SCHOOL\", \"WRITE_EDX_USER_DISTRICT\", \"DELETE_EDX_USER_DISTRICT\", \"CREATE_SECURE_EXCHANGE_COMMENT_SAGA\", \"READ_DISTRICT\", \"WRITE_DISTRICT_CONTACT\", \"DISTRICT_USER_ACTIVATION_INVITE_SAGA\", \"DISTRICT_USER_ACTIVATION_INVITE_SAGA\", \"DELETE_SECURE_EXCHANGE_NOTE\", \"WRITE_SECURE_EXCHANGE_NOTE\", \"READ_SECURE_EXCHANGE_NOTE\", \"DELETE_SECURE_EXCHANGE_COMMENT\", \"WRITE_SECURE_EXCHANGE_COMMENT\", \"READ_SECURE_EXCHANGE_COMMENT\", \"DELETE_SECURE_EXCHANGE_STUDENT\", \"WRITE_SECURE_EXCHANGE_STUDENT\", \"READ_SECURE_EXCHANGE_STUDENT\", \"READ_INSTITUTE_CODES\", \"READ_INDEPENDENT_AUTHORITY\", \"WRITE_INDEPENDENT_AUTHORITY\", \"READ_SCHOOL_NOTE\", \"WRITE_SCHOOL_NOTE\", \"DELETE_SCHOOL_NOTE\", \"WRITE_SCHOOL_CONTACT\", \"WRITE_INDEPENDENT_AUTHORITY_CONTACT\", \"READ_INDEPENDENT_AUTHORITY_NOTE\", \"WRITE_INDEPENDENT_AUTHORITY_NOTE\", \"DELETE_INDEPENDENT_AUTHORITY_NOTE\", \"WRITE_SCHOOL\", \"WRITE_DISTRICT\", \"READ_DISTRICT_NOTE\", \"WRITE_DISTRICT_NOTE\", \"DELETE_DISTRICT_NOTE\", \"READ_SCHOOL_HISTORY\",\"MOVE_SCHOOL_SAGA\", \"CREATE_SCHOOL_SAGA\", \"READ_SCHOOL_CONTACT\", \"READ_DISTRICT_CONTACT\", \"READ_INDEPENDENT_AUTHORITY_CONTACT\", \"READ_SCHOOL_FUNDING_GROUP\", \"WRITE_SCHOOL_FUNDING_GROUP\", \"DELETE_SCHOOL_FUNDING_GROUP\", \"READ_SDC_COLLECTION\", \"READ_SDC_DISTRICT_COLLECTION\", \"READ_COLLECTION_CODES\", \"WRITE_COLLECTION_CODES\", \"WRITE_ACTIVATION_CODE\", \"READ_SDC_SCHOOL_COLLECTION_STUDENT\", \"WRITE_SDC_DISTRICT_COLLECTION\", \"WRITE_SDC_SCHOOL_COLLECTION_STUDENT\", \"WRITE_SDC_COLLECTION\", \"READ_EAS_SESSIONS\", \"WRITE_EAS_SESSIONS\"], \"optionalClientScopes\" : [ \"address\", \"phone\" ], \"access\" : { \"view\" : true, \"configure\" : true, \"manage\" : true } }" else echo echo Creating client student-admin-service without secret curl -sX POST "https://$SOAM_KC/auth/admin/realms/$SOAM_KC_REALM_ID/clients" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $TKN" \ - -d "{ \"clientId\" : \"student-admin-service\", \"name\" : \"Student Admin Service Client\", \"description\" : \"Student admin user which logs into SOAM\", \"surrogateAuthRequired\" : false, \"enabled\" : true, \"clientAuthenticatorType\" : \"client-secret\", \"redirectUris\" : [ ], \"webOrigins\" : [ ], \"notBefore\" : 0, \"bearerOnly\" : false, \"consentRequired\" : false, \"standardFlowEnabled\" : false, \"implicitFlowEnabled\" : false, \"directAccessGrantsEnabled\" : false, \"serviceAccountsEnabled\" : true, \"publicClient\" : false, \"frontchannelLogout\" : false, \"protocol\" : \"openid-connect\", \"attributes\" : { \"saml.assertion.signature\" : \"false\", \"saml.multivalued.roles\" : \"false\", \"saml.force.post.binding\" : \"false\", \"saml.encrypt\" : \"false\", \"saml.server.signature\" : \"false\", \"saml.server.signature.keyinfo.ext\" : \"false\", \"exclude.session.state.from.auth.response\" : \"false\", \"saml_force_name_id_format\" : \"false\", \"saml.client.signature\" : \"false\", \"tls.client.certificate.bound.access.tokens\" : \"false\", \"saml.authnstatement\" : \"false\", \"display.on.consent.screen\" : \"false\", \"saml.onetimeuse.condition\" : \"false\" }, \"authenticationFlowBindingOverrides\" : { }, \"fullScopeAllowed\" : true, \"nodeReRegistrationTimeout\" : -1, \"protocolMappers\" : [ ], \"defaultClientScopes\" : [ \"web-origins\", \"role_list\", \"SEND_PEN_REQUEST_EMAIL\", \"WRITE_PEN_REQUEST\", \"profile\", \"roles\", \"email\", \"READ_PEN_REQUEST\", \"READ_PEN_REQUEST_STATUSES\", \"READ_PEN_DEMOGRAPHICS\", \"WRITE_DIGITALID\", \"READ_DIGITALID\", \"WRITE_STUDENT\", \"READ_STUDENT\", \"READ_STUDENT_CODES\", \"READ_DIGITALID_CODETABLE\", \"READ_DOCUMENT\", \"READ_DOCUMENT_TYPES\", \"WRITE_DOCUMENT\", \"READ_STUDENT_PROFILE\", \"WRITE_STUDENT_PROFILE\", \"READ_SDC_MINISTRY_REPORTS\", \"READ_DOCUMENT_STUDENT_PROFILE\", \"WRITE_DOCUMENT_STUDENT_PROFILE\", \"READ_DOCUMENT_TYPES_STUDENT_PROFILE\", \"READ_STUDENT_PROFILE_STATUSES\", \"READ_STUDENT_PROFILE_CODES\", \"SEND_STUDENT_PROFILE_EMAIL\",\"PEN_REQUEST_UNLINK_SAGA\",\"PEN_REQUEST_REJECT_SAGA\",\"PEN_REQUEST_RETURN_SAGA\",\"PEN_REQUEST_COMPLETE_SAGA\",\"STUDENT_PROFILE_COMPLETE_SAGA\",\"READ_SECURE_EXCHANGE_DOCUMENT_REQUIREMENTS\",\"STUDENT_PROFILE_REJECT_SAGA\",\"STUDENT_PROFILE_RETURN_SAGA\", \"READ_PEN_REQUEST_BATCH\", \"READ_PEN_MATCH\", \"WRITE_PEN_REQUEST_BATCH\", \"STUDENT_PROFILE_READ_SAGA\", \"GET_NEXT_PEN_NUMBER\", \"VALIDATE_STUDENT_DEMOGRAPHICS\",\"PEN_REQUEST_BATCH_NEW_PEN_SAGA\",\"PEN_REQUEST_BATCH_USER_MATCH_SAGA\",\"PEN_REQUEST_BATCH_READ_SAGA\", \"READ_VALIDATION_CODES\", \"READ_STUDENT_HISTORY\", \"READ_NICKNAMES\", \"READ_SCHOOL_FUNDING_GROUP_SNAPSHOT\", \"READ_SCHOOL\", \"READ_PEN_TRAX\", \"READ_SLD_STUDENT\",\"WRITE_POSSIBLE_MATCH\",\"DELETE_POSSIBLE_MATCH\",\"READ_POSSIBLE_MATCH\",\"READ_STUDENT_MERGE\" ,\"WRITE_STUDENT_MERGE\",\"READ_STUDENT_MERGE_CODES\",\"STUDENT_MERGE_COMPLETE_SAGA\",\"STUDENT_DEMERGE_COMPLETE_SAGA\",\"PEN_SERVICES_READ_SAGA\",\"READ_PEN_REQUEST_BATCH_BLOB\",\"STUDENT_SPLIT_PEN_SAGA\", \"PEN_REQUEST_BATCH_ARCHIVE_SAGA\", \"PEN_REQUEST_BATCH_REPOST_SAGA\", \"READ_PEN_COORDINATOR\", \"WRITE_PEN_COORDINATOR\", \"READ_PEN_MACRO\", \"WRITE_PEN_MACRO\", \"MACRO_READ_SAGA\",\"READ_PEN_REQUEST_STATS\", \"READ_STUDENT_PROFILE_STATS\", \"STUDENT_MOVE_SLD_SAGA\", \"NOMINAL_ROLL_READ_STUDENT\", \"NOMINAL_ROLL_WRITE_STUDENT\", \"NOMINAL_ROLL_DELETE_STUDENT\", \"NOMINAL_ROLL_UPLOAD_FILE\", \"NOMINAL_ROLL_VALIDATE\", \"NOMINAL_ROLL_POST_DATA_SAGA\", \"NOMINAL_ROLL_READ_SAGA\", \"READ_FED_PROV_CODE\", \"WRITE_FED_PROV_CODE\", \"NOMINAL_ROLL_CREATE_FED_PROV\", \"READ_SECURE_EXCHANGE\", \"WRITE_SECURE_EXCHANGE\", \"READ_SECURE_EXCHANGE_DOCUMENT\", \"WRITE_SECURE_EXCHANGE_DOCUMENT\", \"DELETE_SECURE_EXCHANGE_DOCUMENT\", \"READ_SECURE_EXCHANGE_CODES\", \"READ_SECURE_EXCHANGE_DOCUMENT_TYPES\", \"READ_SECURE_EXCHANGE_STATUSES\", \"READ_MINISTRY_TEAMS\", \"READ_EDX_USER_SCHOOLS\", \"DELETE_SECURE_EXCHANGE\", \"READ_EDX_USERS\", \"READ_PRIMARY_ACTIVATION_CODE\", \"WRITE_PRIMARY_ACTIVATION_CODE\", \"WRITE_EDX_USER_SCHOOL\", \"SCHOOL_USER_ACTIVATION_INVITE_SAGA\", \"CREATE_SECURE_EXCHANGE_SAGA\", \"DELETE_EDX_USER_SCHOOL\", \"WRITE_EDX_USER_DISTRICT\", \"DELETE_EDX_USER_DISTRICT\", \"CREATE_SECURE_EXCHANGE_COMMENT_SAGA\", \"READ_DISTRICT\", \"WRITE_DISTRICT_CONTACT\", \"DISTRICT_USER_ACTIVATION_INVITE_SAGA\", \"DELETE_SECURE_EXCHANGE_NOTE\", \"WRITE_SECURE_EXCHANGE_NOTE\", \"READ_SECURE_EXCHANGE_NOTE\", \"DELETE_SECURE_EXCHANGE_COMMENT\", \"WRITE_SECURE_EXCHANGE_COMMENT\", \"READ_SECURE_EXCHANGE_COMMENT\", \"DELETE_SECURE_EXCHANGE_STUDENT\", \"WRITE_SECURE_EXCHANGE_STUDENT\", \"READ_SECURE_EXCHANGE_STUDENT\", \"READ_INSTITUTE_CODES\", \"READ_INDEPENDENT_AUTHORITY\", \"WRITE_INDEPENDENT_AUTHORITY\", \"READ_SCHOOL_NOTE\", \"WRITE_SCHOOL_NOTE\", \"DELETE_SCHOOL_NOTE\", \"WRITE_SCHOOL_CONTACT\", \"WRITE_INDEPENDENT_AUTHORITY_CONTACT\", \"READ_INDEPENDENT_AUTHORITY_NOTE\", \"WRITE_INDEPENDENT_AUTHORITY_NOTE\", \"DELETE_INDEPENDENT_AUTHORITY_NOTE\", \"WRITE_SCHOOL\", \"WRITE_DISTRICT\", \"READ_DISTRICT_NOTE\", \"WRITE_DISTRICT_NOTE\", \"DELETE_DISTRICT_NOTE\", \"READ_SCHOOL_HISTORY\", \"MOVE_SCHOOL_SAGA\", \"CREATE_SCHOOL_SAGA\", \"READ_SCHOOL_CONTACT\", \"READ_DISTRICT_CONTACT\", \"READ_INDEPENDENT_AUTHORITY_CONTACT\", \"READ_SCHOOL_FUNDING_GROUP\", \"WRITE_SCHOOL_FUNDING_GROUP\", \"DELETE_SCHOOL_FUNDING_GROUP\", \"READ_SDC_COLLECTION\", \"READ_SDC_DISTRICT_COLLECTION\", \"READ_COLLECTION_CODES\", \"WRITE_COLLECTION_CODES\", \"WRITE_SDC_DISTRICT_COLLECTION\", \"WRITE_ACTIVATION_CODE\", \"READ_SDC_SCHOOL_COLLECTION_STUDENT\", \"WRITE_SDC_SCHOOL_COLLECTION_STUDENT\", \"WRITE_SDC_COLLECTION\"], \"optionalClientScopes\" : [ \"address\", \"phone\" ], \"access\" : { \"view\" : true, \"configure\" : true, \"manage\" : true } }" + -d "{ \"clientId\" : \"student-admin-service\", \"name\" : \"Student Admin Service Client\", \"description\" : \"Student admin user which logs into SOAM\", \"surrogateAuthRequired\" : false, \"enabled\" : true, \"clientAuthenticatorType\" : \"client-secret\", \"redirectUris\" : [ ], \"webOrigins\" : [ ], \"notBefore\" : 0, \"bearerOnly\" : false, \"consentRequired\" : false, \"standardFlowEnabled\" : false, \"implicitFlowEnabled\" : false, \"directAccessGrantsEnabled\" : false, \"serviceAccountsEnabled\" : true, \"publicClient\" : false, \"frontchannelLogout\" : false, \"protocol\" : \"openid-connect\", \"attributes\" : { \"saml.assertion.signature\" : \"false\", \"saml.multivalued.roles\" : \"false\", \"saml.force.post.binding\" : \"false\", \"saml.encrypt\" : \"false\", \"saml.server.signature\" : \"false\", \"saml.server.signature.keyinfo.ext\" : \"false\", \"exclude.session.state.from.auth.response\" : \"false\", \"saml_force_name_id_format\" : \"false\", \"saml.client.signature\" : \"false\", \"tls.client.certificate.bound.access.tokens\" : \"false\", \"saml.authnstatement\" : \"false\", \"display.on.consent.screen\" : \"false\", \"saml.onetimeuse.condition\" : \"false\" }, \"authenticationFlowBindingOverrides\" : { }, \"fullScopeAllowed\" : true, \"nodeReRegistrationTimeout\" : -1, \"protocolMappers\" : [ ], \"defaultClientScopes\" : [ \"web-origins\", \"role_list\", \"SEND_PEN_REQUEST_EMAIL\", \"WRITE_PEN_REQUEST\", \"profile\", \"roles\", \"email\", \"READ_PEN_REQUEST\", \"READ_PEN_REQUEST_STATUSES\", \"READ_PEN_DEMOGRAPHICS\", \"WRITE_DIGITALID\", \"READ_DIGITALID\", \"WRITE_STUDENT\", \"READ_STUDENT\", \"READ_STUDENT_CODES\", \"READ_DIGITALID_CODETABLE\", \"READ_DOCUMENT\", \"READ_DOCUMENT_TYPES\", \"WRITE_DOCUMENT\", \"READ_STUDENT_PROFILE\", \"WRITE_STUDENT_PROFILE\", \"READ_SDC_MINISTRY_REPORTS\", \"READ_DOCUMENT_STUDENT_PROFILE\", \"WRITE_DOCUMENT_STUDENT_PROFILE\", \"READ_DOCUMENT_TYPES_STUDENT_PROFILE\", \"READ_STUDENT_PROFILE_STATUSES\", \"READ_STUDENT_PROFILE_CODES\", \"SEND_STUDENT_PROFILE_EMAIL\",\"PEN_REQUEST_UNLINK_SAGA\",\"PEN_REQUEST_REJECT_SAGA\",\"PEN_REQUEST_RETURN_SAGA\",\"PEN_REQUEST_COMPLETE_SAGA\",\"STUDENT_PROFILE_COMPLETE_SAGA\",\"READ_SECURE_EXCHANGE_DOCUMENT_REQUIREMENTS\",\"STUDENT_PROFILE_REJECT_SAGA\",\"STUDENT_PROFILE_RETURN_SAGA\", \"READ_PEN_REQUEST_BATCH\", \"READ_PEN_MATCH\", \"WRITE_PEN_REQUEST_BATCH\", \"STUDENT_PROFILE_READ_SAGA\", \"GET_NEXT_PEN_NUMBER\", \"VALIDATE_STUDENT_DEMOGRAPHICS\",\"PEN_REQUEST_BATCH_NEW_PEN_SAGA\",\"PEN_REQUEST_BATCH_USER_MATCH_SAGA\",\"PEN_REQUEST_BATCH_READ_SAGA\", \"READ_VALIDATION_CODES\", \"READ_STUDENT_HISTORY\", \"READ_NICKNAMES\", \"READ_SCHOOL_FUNDING_GROUP_SNAPSHOT\", \"READ_SCHOOL\", \"READ_PEN_TRAX\", \"READ_SLD_STUDENT\",\"WRITE_POSSIBLE_MATCH\",\"DELETE_POSSIBLE_MATCH\",\"READ_POSSIBLE_MATCH\",\"READ_STUDENT_MERGE\" ,\"WRITE_STUDENT_MERGE\",\"READ_STUDENT_MERGE_CODES\",\"STUDENT_MERGE_COMPLETE_SAGA\",\"STUDENT_DEMERGE_COMPLETE_SAGA\",\"PEN_SERVICES_READ_SAGA\",\"READ_PEN_REQUEST_BATCH_BLOB\",\"STUDENT_SPLIT_PEN_SAGA\", \"PEN_REQUEST_BATCH_ARCHIVE_SAGA\", \"PEN_REQUEST_BATCH_REPOST_SAGA\", \"READ_PEN_COORDINATOR\", \"WRITE_PEN_COORDINATOR\", \"READ_PEN_MACRO\", \"WRITE_PEN_MACRO\", \"MACRO_READ_SAGA\",\"READ_PEN_REQUEST_STATS\", \"READ_STUDENT_PROFILE_STATS\", \"STUDENT_MOVE_SLD_SAGA\", \"NOMINAL_ROLL_READ_STUDENT\", \"NOMINAL_ROLL_WRITE_STUDENT\", \"NOMINAL_ROLL_DELETE_STUDENT\", \"NOMINAL_ROLL_UPLOAD_FILE\", \"NOMINAL_ROLL_VALIDATE\", \"NOMINAL_ROLL_POST_DATA_SAGA\", \"NOMINAL_ROLL_READ_SAGA\", \"READ_FED_PROV_CODE\", \"WRITE_FED_PROV_CODE\", \"NOMINAL_ROLL_CREATE_FED_PROV\", \"READ_SECURE_EXCHANGE\", \"WRITE_SECURE_EXCHANGE\", \"READ_SECURE_EXCHANGE_DOCUMENT\", \"WRITE_SECURE_EXCHANGE_DOCUMENT\", \"DELETE_SECURE_EXCHANGE_DOCUMENT\", \"READ_SECURE_EXCHANGE_CODES\", \"READ_SECURE_EXCHANGE_DOCUMENT_TYPES\", \"READ_SECURE_EXCHANGE_STATUSES\", \"READ_MINISTRY_TEAMS\", \"READ_EDX_USER_SCHOOLS\", \"DELETE_SECURE_EXCHANGE\", \"READ_EDX_USERS\", \"READ_PRIMARY_ACTIVATION_CODE\", \"WRITE_PRIMARY_ACTIVATION_CODE\", \"WRITE_EDX_USER_SCHOOL\", \"SCHOOL_USER_ACTIVATION_INVITE_SAGA\", \"CREATE_SECURE_EXCHANGE_SAGA\", \"DELETE_EDX_USER_SCHOOL\", \"WRITE_EDX_USER_DISTRICT\", \"DELETE_EDX_USER_DISTRICT\", \"CREATE_SECURE_EXCHANGE_COMMENT_SAGA\", \"READ_DISTRICT\", \"WRITE_DISTRICT_CONTACT\", \"DISTRICT_USER_ACTIVATION_INVITE_SAGA\", \"DELETE_SECURE_EXCHANGE_NOTE\", \"WRITE_SECURE_EXCHANGE_NOTE\", \"READ_SECURE_EXCHANGE_NOTE\", \"DELETE_SECURE_EXCHANGE_COMMENT\", \"WRITE_SECURE_EXCHANGE_COMMENT\", \"READ_SECURE_EXCHANGE_COMMENT\", \"DELETE_SECURE_EXCHANGE_STUDENT\", \"WRITE_SECURE_EXCHANGE_STUDENT\", \"READ_SECURE_EXCHANGE_STUDENT\", \"READ_INSTITUTE_CODES\", \"READ_INDEPENDENT_AUTHORITY\", \"WRITE_INDEPENDENT_AUTHORITY\", \"READ_SCHOOL_NOTE\", \"WRITE_SCHOOL_NOTE\", \"DELETE_SCHOOL_NOTE\", \"WRITE_SCHOOL_CONTACT\", \"WRITE_INDEPENDENT_AUTHORITY_CONTACT\", \"READ_INDEPENDENT_AUTHORITY_NOTE\", \"WRITE_INDEPENDENT_AUTHORITY_NOTE\", \"DELETE_INDEPENDENT_AUTHORITY_NOTE\", \"WRITE_SCHOOL\", \"WRITE_DISTRICT\", \"READ_DISTRICT_NOTE\", \"WRITE_DISTRICT_NOTE\", \"DELETE_DISTRICT_NOTE\", \"READ_SCHOOL_HISTORY\", \"MOVE_SCHOOL_SAGA\", \"CREATE_SCHOOL_SAGA\", \"READ_SCHOOL_CONTACT\", \"READ_DISTRICT_CONTACT\", \"READ_INDEPENDENT_AUTHORITY_CONTACT\", \"READ_SCHOOL_FUNDING_GROUP\", \"WRITE_SCHOOL_FUNDING_GROUP\", \"DELETE_SCHOOL_FUNDING_GROUP\", \"READ_SDC_COLLECTION\", \"READ_SDC_DISTRICT_COLLECTION\", \"READ_COLLECTION_CODES\", \"WRITE_COLLECTION_CODES\", \"WRITE_SDC_DISTRICT_COLLECTION\", \"WRITE_ACTIVATION_CODE\", \"READ_SDC_SCHOOL_COLLECTION_STUDENT\", \"WRITE_SDC_SCHOOL_COLLECTION_STUDENT\", \"WRITE_SDC_COLLECTION\", \"READ_EAS_SESSIONS\", \"WRITE_EAS_SESSIONS\"], \"optionalClientScopes\" : [ \"address\", \"phone\" ], \"access\" : { \"view\" : true, \"configure\" : true, \"manage\" : true } }" fi echo Fetching public key from SOAM @@ -690,11 +717,12 @@ BANNER_ENVIRONMENT="$bannerEnvironment" BANNER_COLOR="$bannerColor" WEB_SOCKET_URL="wss://$SERVER_FRONTEND/api/socket" IS_RATE_LIMIT_ENABLED=true +DISABLE_EAS_FUNCTIONALITY=true RATE_LIMIT_WINDOW_IN_SEC="60" RATE_LIMIT_LIMIT="1000" echo Creating config map $APP_NAME-backend-config-map -oc create -n $PEN_NAMESPACE-$envValue configmap $APP_NAME-backend-config-map --from-literal=IS_RATE_LIMIT_ENABLED="$IS_RATE_LIMIT_ENABLED" --from-literal=RATE_LIMIT_WINDOW_IN_SEC="$RATE_LIMIT_WINDOW_IN_SEC" --from-literal=RATE_LIMIT_LIMIT="$RATE_LIMIT_LIMIT" --from-literal=WEB_SOCKET_URL="$WEB_SOCKET_URL" --from-literal=BANNER_COLOR="$BANNER_COLOR" --from-literal=BANNER_ENVIRONMENT="$BANNER_ENVIRONMENT" --from-literal=TZ=$TZVALUE --from-literal=UI_PRIVATE_KEY="$UI_PRIVATE_KEY_VAL" --from-literal=SITEMINDER_LOGOUT_ENDPOINT="$siteMinderLogoutUrl" --from-literal=UI_PUBLIC_KEY="$UI_PUBLIC_KEY_VAL" --from-literal=ID=$APP_NAME-soam --from-literal=SECRET=$studentAdminClientSecret --from-literal=SERVICE_CLIENT_ID=$APP_NAME-service --from-literal=SERVICE_CLIENT_SECRET=$studentAdminServiceClientSecret --from-literal=SERVER_FRONTEND=https://$SERVER_FRONTEND --from-literal=ISSUER=STUDENT_ADMIN_APPLICATION --from-literal=SOAM_PUBLIC_KEY="$formattedPublicKey" --from-literal=PEN_REQUEST_EMAIL_API_URL="http://student-profile-email-api-master.$PEN_NAMESPACE-$envValue.svc.cluster.local:8080/gmp" --from-literal=PEN_REQUEST_API_URL="http://pen-request-api-master.$COMMON_NAMESPACE-$envValue.svc.cluster.local:8080/api/v1/pen-request" --from-literal=DISCOVERY=https://$SOAM_KC/auth/realms/$SOAM_KC_REALM_ID/.well-known/openid-configuration --from-literal=KC_DOMAIN=https://$SOAM_KC/auth/realms/$SOAM_KC_REALM_ID --from-literal=PEN_DEMOGRAPHICS_URL="http://pen-demographics-api-master.$COMMON_NAMESPACE-$envValue.svc.cluster.local:8080" --from-literal=DIGITAL_ID_URL="http://digitalid-api-master.$COMMON_NAMESPACE-$envValue.svc.cluster.local:8080/api/v1/digital-id" --from-literal=STUDENT_API_URL="http://student-api-master.$COMMON_NAMESPACE-$envValue.svc.cluster.local:8080/api/v1/student" --from-literal=LOG_LEVEL=info --from-literal=IDIR_IDP_HINT=keycloak_bcdevexchange_idir --from-literal=REDIS_HOST=redis --from-literal=REDIS_PORT=6379 --from-literal=STUDENT_PROFILE_API_URL="http://student-profile-api-master.$COMMON_NAMESPACE-$envValue.svc.cluster.local:8080/api/v1/student-profile" --from-literal=SCHOOL_API_URL="http://school-api-master.$COMMON_NAMESPACE-$envValue.svc.cluster.local:8080/api/v1" --from-literal=STUDENT_PROFILE_EMAIL_API_URL="http://student-profile-email-api-master.$PEN_NAMESPACE-$envValue.svc.cluster.local:8080/ump" --from-literal=PROFILE_REQUEST_SAGA_API_URL="http://student-profile-saga-api-master.$PEN_NAMESPACE-$envValue.svc.cluster.local:8080/api/v1/student-profile-saga" --from-literal=NATS_URL="$NATS_URL" --from-literal=NATS_CLUSTER="$NATS_CLUSTER" --from-literal=UMP_ROLES="STUDENT_PROFILE_ADMIN,STUDENT_PROFILE_READ_ONLY" --from-literal=GMP_ROLES="STUDENT_ADMIN,STUDENT_ADMIN_READ_ONLY" --from-literal=STUDENT_SEARCH_ADMIN="STUDENT_SEARCH_ADMIN" --from-literal=STUDENT_SEARCH_ROLES="STUDENT_SEARCH_ADMIN,STUDENT_SEARCH_READ_ONLY" --from-literal=STUDENT_ADMIN_ADMINISTRATOR="STUDENT_ADMIN_ADMINISTRATOR" --from-literal=UMP_ROLE_ADMIN="STUDENT_PROFILE_ADMIN" --from-literal=GMP_ROLE_ADMIN="STUDENT_ADMIN" --from-literal=PEN_REQUEST_BATCH_ADMIN="PEN_REQUEST_BATCH_ADMIN" --from-literal=EDX_ADMIN="EDX_ADMIN" --from-literal=PEN_REQUEST_BATCH_API_URL="http://pen-reg-batch-api-master.$PEN_NAMESPACE-$envValue.svc.cluster.local:8080/api/v1" --from-literal=PEN_MATCH_API_URL="http://pen-match-api-master.$PEN_NAMESPACE-$envValue.svc.cluster.local:8080/api/v1/pen-match" --from-literal=SESSION_MAX_AGE=$sessionMaxAge --from-literal=TOKEN_EXPIRES_IN=$tokenExpiresIn --from-literal=SCHEDULER_CRON_STALE_SAGA_RECORD_REDIS="0/30 * * * * *" --from-literal=MIN_TIME_BEFORE_SAGA_IS_STALE_IN_SECONDS=10 --from-literal=PEN_SERVICES_API_URL="http://pen-services-api-master.$PEN_NAMESPACE-$envValue.svc.cluster.local:8080/api/v1/pen-services" --from-literal=PEN_TRAX_API_URL="http://pen-trax-api-master.$COMMON_NAMESPACE-$envValue.svc.cluster.local:8080/api/v1" --from-literal=SLD_API_URL="http://sld-api-master.$COMMON_NAMESPACE-$envValue.svc.cluster.local:8080/api/v1" --from-literal=QUEUE_GROUP_NAME="student-admin-node-queue-group" --from-literal=STAN_ENABLED="true" --from-literal=NODE_ENV="openshift" --from-literal=SCHEDULER_CRON_DOC_TYPE_MIGRATION="$SCHEDULER_CRON_DOC_TYPE_MIGRATION" --from-literal=ENABLE_PRR_STUDENT_DEMOGRAPHICS="$ENABLE_PRR_STUDENT_DEMOGRAPHICS" --from-literal=NOMINAL_ROLL="NOMINAL_ROLL_EDIT" --from-literal=MACRO_API_URL="http://macro-api-master.$COMMON_NAMESPACE-$envValue.svc.cluster.local:8080/api/v1/macro" --from-literal=NOMINAL_ROLL_API_URL="http://pen-nominal-roll-api-main.$PEN_NAMESPACE-$envValue.svc.cluster.local:8080/api/v1/nominal-roll" --from-literal=STUDENT_ANALYTICS_STUDENT_PROFILE="STUDENT_ANALYTICS_STUDENT_PROFILE" --from-literal=STUDENT_ANALYTICS_BATCH="STUDENT_ANALYTICS_BATCH" --from-literal=NOMINAL_ROLL_ROLES="NOMINAL_ROLL,NOMINAL_ROLL_EDIT" --from-literal=EDX_API_URL="http://edx-api-master.$EDX_NAMESPACE-$envValue.svc.cluster.local:8080/api/v1/edx" --from-literal=SDC_API_URL="http://student-data-collection-api-master.$EDX_NAMESPACE-$envValue.svc.cluster.local:8080/api/v1/student-data-collection" --from-literal=INSTITUTE_API_URL="http://institute-api-master.$COMMON_NAMESPACE-$envValue.svc.cluster.local:8080/api/v1/institute" --from-literal=EDX_PEN_TEAM_ROLES="PEN_TEAM_ROLE" --from-literal=INSTITUTE_ROLES="OFFSHORE_SCHOOLS_ADMIN" --from-literal=DISABLE_SDC_FUNCTIONALITY=$disableSdcFunctionality --from-literal=EDX_URL=$EDUC_EDX_FRONTEND --dry-run -o yaml | oc apply -f - +oc create -n $PEN_NAMESPACE-$envValue configmap $APP_NAME-backend-config-map --from-literal=IS_RATE_LIMIT_ENABLED="$IS_RATE_LIMIT_ENABLED" --from-literal=DISABLE_EAS_FUNCTIONALITY="$DISABLE_EAS_FUNCTIONALITY" --from-literal=RATE_LIMIT_WINDOW_IN_SEC="$RATE_LIMIT_WINDOW_IN_SEC" --from-literal=RATE_LIMIT_LIMIT="$RATE_LIMIT_LIMIT" --from-literal=WEB_SOCKET_URL="$WEB_SOCKET_URL" --from-literal=BANNER_COLOR="$BANNER_COLOR" --from-literal=BANNER_ENVIRONMENT="$BANNER_ENVIRONMENT" --from-literal=TZ=$TZVALUE --from-literal=UI_PRIVATE_KEY="$UI_PRIVATE_KEY_VAL" --from-literal=SITEMINDER_LOGOUT_ENDPOINT="$siteMinderLogoutUrl" --from-literal=UI_PUBLIC_KEY="$UI_PUBLIC_KEY_VAL" --from-literal=ID=$APP_NAME-soam --from-literal=SECRET=$studentAdminClientSecret --from-literal=SERVICE_CLIENT_ID=$APP_NAME-service --from-literal=SERVICE_CLIENT_SECRET=$studentAdminServiceClientSecret --from-literal=SERVER_FRONTEND=https://$SERVER_FRONTEND --from-literal=ISSUER=STUDENT_ADMIN_APPLICATION --from-literal=SOAM_PUBLIC_KEY="$formattedPublicKey" --from-literal=PEN_REQUEST_EMAIL_API_URL="http://student-profile-email-api-master.$PEN_NAMESPACE-$envValue.svc.cluster.local:8080/gmp" --from-literal=PEN_REQUEST_API_URL="http://pen-request-api-master.$COMMON_NAMESPACE-$envValue.svc.cluster.local:8080/api/v1/pen-request" --from-literal=DISCOVERY=https://$SOAM_KC/auth/realms/$SOAM_KC_REALM_ID/.well-known/openid-configuration --from-literal=KC_DOMAIN=https://$SOAM_KC/auth/realms/$SOAM_KC_REALM_ID --from-literal=PEN_DEMOGRAPHICS_URL="http://pen-demographics-api-master.$COMMON_NAMESPACE-$envValue.svc.cluster.local:8080" --from-literal=DIGITAL_ID_URL="http://digitalid-api-master.$COMMON_NAMESPACE-$envValue.svc.cluster.local:8080/api/v1/digital-id" --from-literal=STUDENT_API_URL="http://student-api-master.$COMMON_NAMESPACE-$envValue.svc.cluster.local:8080/api/v1/student" --from-literal=LOG_LEVEL=info --from-literal=IDIR_IDP_HINT=keycloak_bcdevexchange_idir --from-literal=REDIS_HOST=redis --from-literal=REDIS_PORT=6379 --from-literal=STUDENT_PROFILE_API_URL="http://student-profile-api-master.$COMMON_NAMESPACE-$envValue.svc.cluster.local:8080/api/v1/student-profile" --from-literal=SCHOOL_API_URL="http://school-api-master.$COMMON_NAMESPACE-$envValue.svc.cluster.local:8080/api/v1" --from-literal=STUDENT_PROFILE_EMAIL_API_URL="http://student-profile-email-api-master.$PEN_NAMESPACE-$envValue.svc.cluster.local:8080/ump" --from-literal=PROFILE_REQUEST_SAGA_API_URL="http://student-profile-saga-api-master.$PEN_NAMESPACE-$envValue.svc.cluster.local:8080/api/v1/student-profile-saga" --from-literal=NATS_URL="$NATS_URL" --from-literal=NATS_CLUSTER="$NATS_CLUSTER" --from-literal=UMP_ROLES="STUDENT_PROFILE_ADMIN,STUDENT_PROFILE_READ_ONLY" --from-literal=GMP_ROLES="STUDENT_ADMIN,STUDENT_ADMIN_READ_ONLY" --from-literal=STUDENT_SEARCH_ADMIN="STUDENT_SEARCH_ADMIN" --from-literal=STUDENT_SEARCH_ROLES="STUDENT_SEARCH_ADMIN,STUDENT_SEARCH_READ_ONLY" --from-literal=STUDENT_ADMIN_ADMINISTRATOR="STUDENT_ADMIN_ADMINISTRATOR" --from-literal=UMP_ROLE_ADMIN="STUDENT_PROFILE_ADMIN" --from-literal=GMP_ROLE_ADMIN="STUDENT_ADMIN" --from-literal=PEN_REQUEST_BATCH_ADMIN="PEN_REQUEST_BATCH_ADMIN" --from-literal=EDX_ADMIN="EDX_ADMIN" --from-literal=PEN_REQUEST_BATCH_API_URL="http://pen-reg-batch-api-master.$PEN_NAMESPACE-$envValue.svc.cluster.local:8080/api/v1" --from-literal=PEN_MATCH_API_URL="http://pen-match-api-master.$PEN_NAMESPACE-$envValue.svc.cluster.local:8080/api/v1/pen-match" --from-literal=SESSION_MAX_AGE=$sessionMaxAge --from-literal=TOKEN_EXPIRES_IN=$tokenExpiresIn --from-literal=SCHEDULER_CRON_STALE_SAGA_RECORD_REDIS="0/30 * * * * *" --from-literal=MIN_TIME_BEFORE_SAGA_IS_STALE_IN_SECONDS=10 --from-literal=PEN_SERVICES_API_URL="http://pen-services-api-master.$PEN_NAMESPACE-$envValue.svc.cluster.local:8080/api/v1/pen-services" --from-literal=PEN_TRAX_API_URL="http://pen-trax-api-master.$COMMON_NAMESPACE-$envValue.svc.cluster.local:8080/api/v1" --from-literal=SLD_API_URL="http://sld-api-master.$COMMON_NAMESPACE-$envValue.svc.cluster.local:8080/api/v1" --from-literal=QUEUE_GROUP_NAME="student-admin-node-queue-group" --from-literal=STAN_ENABLED="true" --from-literal=NODE_ENV="openshift" --from-literal=SCHEDULER_CRON_DOC_TYPE_MIGRATION="$SCHEDULER_CRON_DOC_TYPE_MIGRATION" --from-literal=ENABLE_PRR_STUDENT_DEMOGRAPHICS="$ENABLE_PRR_STUDENT_DEMOGRAPHICS" --from-literal=NOMINAL_ROLL="NOMINAL_ROLL_EDIT" --from-literal=MACRO_API_URL="http://macro-api-master.$COMMON_NAMESPACE-$envValue.svc.cluster.local:8080/api/v1/macro" --from-literal=NOMINAL_ROLL_API_URL="http://pen-nominal-roll-api-main.$PEN_NAMESPACE-$envValue.svc.cluster.local:8080/api/v1/nominal-roll" --from-literal=STUDENT_ANALYTICS_STUDENT_PROFILE="STUDENT_ANALYTICS_STUDENT_PROFILE" --from-literal=STUDENT_ANALYTICS_BATCH="STUDENT_ANALYTICS_BATCH" --from-literal=NOMINAL_ROLL_ROLES="NOMINAL_ROLL,NOMINAL_ROLL_EDIT" --from-literal=EDX_API_URL="http://edx-api-master.$EDX_NAMESPACE-$envValue.svc.cluster.local:8080/api/v1/edx" --from-literal=SDC_API_URL="http://student-data-collection-api-master.$EDX_NAMESPACE-$envValue.svc.cluster.local:8080/api/v1/student-data-collection" --from-literal=INSTITUTE_API_URL="http://institute-api-master.$COMMON_NAMESPACE-$envValue.svc.cluster.local:8080/api/v1/institute" --from-literal=EDX_PEN_TEAM_ROLES="PEN_TEAM_ROLE" --from-literal=INSTITUTE_ROLES="OFFSHORE_SCHOOLS_ADMIN" --from-literal=DISABLE_SDC_FUNCTIONALITY=$disableSdcFunctionality --from-literal=EDX_URL=$EDUC_EDX_FRONTEND --dry-run -o yaml | oc apply -f - echo echo Setting environment variables for $APP_NAME-backend-$SOAM_KC_REALM_ID application oc -n $PEN_NAMESPACE-$envValue set env --from=configmap/$APP_NAME-backend-config-map dc/$APP_NAME-backend-$SOAM_KC_REALM_ID