Commit b5c076af authored by Tristan A Spakes's avatar Tristan A Spakes

ver. 1.3.6 No longer need to package to test, but temp MFA registration seems...

ver. 1.3.6 No longer need to package to test, but temp MFA registration seems to be fully working now
parent 2eed552a
Pipeline #26114 passed with stages
in 1 minute and 4 seconds
......@@ -16,15 +16,13 @@ function tempMFARegistration() {
}
try { //Check for entry in digest mapping file
var path = remote.app.getPath('exe') //Grabs the path to the executable
path = path.substring(0, path.length - 11) + 'resources/app/badgeManagement/tempMFARegistration/tempMFARegistration.bash'
alert('Please insert an unregistered smart card before proceeding. Ensure it is the only smart card plugged in.')
checkSmartCard()
if(!checkSmartCard()) return
//Grab the unregistered smart card mapping to be added
var entry = execSync(`echo "$(pkcs15-tool -r 1 --rfc4716 2>/dev/null | openssl x509 -noout -fingerprint -sha1 -inform pem | grep -Po '(?<==).*(?=$)') -> ${uid}"`, (error, stdout, stderr) => {})
alert('Please remove the unregistered smart card and then insert a registered smart card. Ensure it is the only smart card plugged in.')
checkSmartCard()
execSync(`pkexec bash -c "echo ${entry} >> /etc/pam_pkcs11/digest_mapping"`, () => {})
if(!checkSmartCard()) return
execSync(`pkexec bash -c 'echo "${entry}" >> /etc/pam_pkcs11/digest_mapping'`, () => {})
} catch(error) {
error = error.toString()
console.log(error)
......@@ -33,6 +31,7 @@ function tempMFARegistration() {
return
}
alert('Initally inserted smart card is now temporarily registered')
ipcRenderer.send('log', 'ORNL Toolbox: Completed MFA temporary registration request', 'info')
}
......@@ -58,13 +57,14 @@ function checkSmartCard() {
if(count > 1) { //More than one slot found
alert('Please ensure only one smart card is inserted')
ipcRenderer.send('log', 'ORNL Toolbox: More than one smart card inserted - request aborted', 'err')
return
return false
} else if(count < 1) { //No slots found
alert('No smart card inserted')
ipcRenderer.send('log', 'ORNL Toolbox: No smart card inserted - request aborted', 'err')
return
return false
} else {
ipcRenderer.send('log', 'ORNL Toolbox: 1 smart card found inserted', 'info')
return true
}
}
......
......@@ -6,7 +6,7 @@ if [[ ${CI_COMMIT_REF_NAME} == 'master' ]]; then
else
BRANCH="-${CI_COMMIT_REF_NAME}"
fi
VERSION_NUMBER='1.3.5'
VERSION_NUMBER='1.3.6'
wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo rpm -ivh epel-release-latest-7.noarch.rpm
sudo yum -y install nodejs npm ruby-devel gcc make rpm-build rubygems
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment