OAuth2 Authentication with GitHub added
Web Application build on InterSystems IRIS for Health and Docker to demonstrate Authentication, Authorization AND Auditing basics.
By using the application New user can be created programmatically along with auditing, roles and SQL privileges, Option to Enable/Disable, Authenticate/Unauthenticate web application and OAuth2 Authentication with GitHub
https://community.intersystems.com/post/programmatically-create-users-grant-privileges-enabledisable-and-authenticateunauthenticate-web
For OAuth2 GitHub authentication
https://community.intersystems.com/post/oauth2-authentication-github-account-iris-web-application
zpm:USER>zpm "install scw-Patient"
git clone https://github.com/mwaseem75/Data_APP_Security.git
cd Data_APP_Security
docker-compose up -d
git clone https://github.com/mwaseem75/Data_APP_Security.git
cd Data_APP_Security
docker-compose up -d
Log in with credentials: SuperUser | SYS
Upon creating user, record with Description “Audit Log inserted from DATA_APP_Security” is added in auditing database which can be viewed from Management portal
(Security > Security Management > View Audit Database)
Navigate to http://localhost:52773/csp/user/scw.DataForm.cls data form by using TestUser | demo
By clicking search button system will raise error:
“ERROR #5580: SQL Privilege Violation: ‘User TestUser is not privileged for the operation’”
Navigate to http://localhost:52773/csp/user/index.csp by using SuperUser | SYS and assign read access by clicking “Grant Read/Write Access”
Now navigate back to http://localhost:52773/csp/user/scw.DataForm.cls for data form by using TestUser | demo and data can be viewed and updated successfully
Log in to management portal from docker http://localhost:52773/csp/sys/%25CSP.Portal.Home.zen using TestUser | demo
System will raise the “ERROR #940: Insufficient privilege for operation”
Navigate to http://localhost:52773/csp/user/index.csp index page by using SuperUser | SYS and Grant all privileges to TestUser by pressing “Grant All Privilege” button.
Now login to management portal http://localhost:52773/csp/sys/%25CSP.Portal.Home.zen by using TestUser | demo and now user has all privileges
Navigate to web terminal application by clicking Web Terminal menu option
After providing credentials web terminal application will open
Let’s disable web terminal application by clicking “Disable WebTerminal Application”.
Now Navigate to web terminal application by clicking Web Terminal menu option and system will display message that application not found
Web terminal application can be enabled by clicking “Enable WebTerminal Application” button.
Web terminal application Authentication can be enabled by clicking “Enable WebTerminal Authentication” button.
Thanks
Evgeny Shvarov for: https://openexchange.intersystems.com/package/secured-rest-api template for guidance