diff --git a/Dockerfile b/Dockerfile index 3e612ec73..76dd8a2cb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,9 @@ -FROM node:alpine +FROM node:8-alpine RUN mkdir /opt/app/ WORKDIR /opt/app/ -RUN apk add git +RUN apk add git python make g++ RUN git config --global url."https://".insteadOf git:// ADD ./package.json package.json ADD ./package-lock.json package-lock.json diff --git a/Jenkinsfile b/Jenkinsfile index b706e7939..edb45c754 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -23,6 +23,7 @@ pipeline { steps { withEnv(['CI=true']) { + sh 'pwd' sh 'npm install' sh 'npm run-script ci' } diff --git a/package.json b/package.json index 0b2440f2a..ccb81772b 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,8 @@ "ts", "tsx", "js", - "json" + "json", + "node" ] }, "bin": "./bin/run.js", diff --git a/src/routes/handlers.js b/src/routes/handlers.js index a140f71bc..3fccbf9de 100644 --- a/src/routes/handlers.js +++ b/src/routes/handlers.js @@ -3,6 +3,7 @@ import assignIn from "lodash.assignin"; import SessionParticipants from "samlp/lib/sessionParticipants"; import samlp from "samlp"; import { SAML, samlp as _samlp } from "passport-wsfed-saml2"; +import * as url from "url"; export const getHashCode = (str) => { var hash = 0; @@ -192,7 +193,9 @@ export const acsFactory = (app, acsUrl) => { }, function(req, res, next) { console.log(req.user); - if (req.user && req.user.claims && req.user.claims.level_of_assurance != '3') { + if (req.user && req.user.claims && + (req.user.claims.level_of_assurance != '3' || + req.user.claims.dslogon_assurance.parseInt() < 2)) { res.redirect(url.format({ pathname: IDP_PATHS.SSO, query: {