Discussion
Pegasystems Inc.
US
Last activity: 25 Nov 2024 11:07 EST
Ask the Expert - Basic Access Control with Elisha Tanikonda and Rachit Agarwal
Welcome to our first ever Ask the Expert session on Basic Access Control (BSC) with Elisha Tanikonda and Rachit Agarwal.
Make sure to Favorite and Follow for updates via the Notification bell and/or weekly digest!
Session dates: 11 November - 22 November
Session opens to questions on 11 November!
Meet Your Expert Elisha Tanikonda
Greetings! I am Elisha Tanikonda, I am with Pega for the last 15 years, mostly worked in the Global Client Support organization (I recently earned my bobble head :-)).
Meet Your Expert Rachit Agarwal
Greetings, this is Rachit Agarwal. I've worked with clients throughout the years to assist them solve problems all across the world. In addition, I work with cross-functional teams to discuss best practices, improve products, create troubleshooting documentation, and more.
Message From Your Expert Elisha Tanikonda
Supporting our clients, troubleshooting their issues is something near and dear me and this is what keeps me motivated to come to work each day. In the recent years, I had the opportunity to work closely in the BAC (Basic Access Control) security feature of the Pega Platform, I am super excited to work closely with you and help answer any questions, queries you might have and specially in this product area, so, please don't hesitate to post your questions here!
Message from Your Expert Rachit Agarwal
I'm here to share with you the knowledge I've gathered over the years regarding Pega's Basic Access Control functionality. I'm thrilled and anticipating a fascinating discussion!
Ask the Expert Rules
- Follow the Pega Support Center's Rules of Engagement
- This is not a Live Chat - Elisha will reply to your questions over the course of the session
- Questions should be clearly and succinctly expressed
- Questions should be of interest to many others in the audience
- Have fun!
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Updated: 13 Nov 2024 9:10 EST
Pegasystems Inc.
US
We would like you to be aware of some of the basics regarding the BAC feature -
1. The documentation link https://docs.pega.com/bundle/platform/page/platform/security/bac.html 2. When rules and the DSS that govern the BAC feature https://docs.pega.com/bundle/platform/page/platform/security/verify-req…
Please feel free to let us know if you have any questions as you use this feature
-
Elisha Tanikonda Arunkumar Velmurugan
Updated: 15 Nov 2024 10:11 EST
Natixis
FR
Hello,
My client is currently adressing BAC issues in our custom code.
MyApplication is based on UIKit 11.01
&
Our current BAC configurations are :
- pzSecureFeature when rule is "true".
- pyShowSecureFeatreWarnings = "false".
- pyBlockUnregistredRequests = "false".
Usually, with the above configurations whenever we run application from an EndUser portal, we get security alerts SECU00019 related to BAC violations, since, we have some UI controles that call unregistred rules.
However, post upgrade to pega plateform 8.8.4, even though the application checking is ON, we don't see anymore the secu00019 alerts in logs.
We can have it catched in logs, only if we change pyBlockUnregistredRequests from false to true.
Can you please clarify why even though application checking is ON the secu00019 alerts are not logged.
Thank you,
Meriem | Pega- Senior System Architect consultant
Pegasystems Inc.
US
@MeriemA16758953 Hello, Thank you for the query.
So, when pyBlockUnregistredRequests is set to true, Pega would try to check if the request is valid request or not. If not, it will throw a 403 alert(you can check the network request in the Dev tools) and user will be blocked with their work.
When it is set to false, Pega would not throw any 403 alert(in the Dev tools) and users will not be blocked with their work.
However, in both these situations, Pega would throw a Secu0019 ALERT as Secu0019 does not depend on the when rule.
I have not came across scenario where even though a it is a valid BAC scenario, and still this does not gets printed in the logs. Can you can please let us know if this is happening across all environments or if in one specific environment.
Also, like I mentioned before users are best advised to be latest UI-KIT version. For 8.8.4, it is UI-KIT 15:01.
Pegasystems Inc.
US
I second Rachit
@MeriemA16758953 please ensure that you are testing the scenario by directly logging as an End User.
If you login to Dev Studio and then launch the End User portal, BAC feature will not turn on (based on the logic in pzSecureFeatures when rule).
Thank you
Natixis
FR
@Elisha Tanikonda Yes as I've mentionned in my first Post. We are testing through as an EndUser.
Thank you,
Meriem | Pega- Senior System Architect consultant
Natixis
FR
@Rachit_Agarwal thanks for your response. Well the issue is happening across all environments from DEV to Prodcution.
Thank you,
Meriem | Pega- Senior System Architect consultant
Pegasystems Inc.
US
Hi Meriem
Sorry that you are still having this issue!
Here are some additional troubleshooting steps, please see if this scenario applies to you!
In case you are on a multi-node environment, please ensure to check the Alert Security logs in all the nodes. Alternatively, login using the direct node URL and check for the logs for that node.
In case the suggestions do not help, we will continue the investigation via the support ticket, we see that you have an active INC.
Thank you
-
Marije Schillern
Pegasystems Inc.
US
Pega documentation Basic access control does not tell how Pega engine determines whether a http request invoking an activity is secure or not.
For example, if there is ajax call from frontend that invokes activity "work-.foo", how does Pega engine determines whether this call is secure or not? Does Pega engine looks up a "safe call" whitelist in order determine, or by other way?
Please provide a high-level picture on how BAC is supposed to work.
-
Elisha Tanikonda
Updated: 14 Nov 2024 0:15 EST
Pegasystems Inc.
US
Hello Yining
Great question! Please review below my response, hope it helps!
Scenario 1: When rule pyBlockUnregisteredRequests is set to return false
Pega engine will not block the unregistered requests, you will not see HTTP 403 status code in the network trace, however Pega will still log SECU0019 alert code in the AlertSecurity log file ( so, letting you know that you still need to take care of these alerts)
Link below will provide additional information on the rules that govern the BAC feature
Scenario 2: When rule pyBlockUnregisteredRequests is set to return true
Pega Engine will block the unregistered requests, you will see HTTP 403 status code in the network trace and also SECU0019 in the Alert Security log file.
When the Engine receives a call for Work-. Foo, it verifies if Foo is already registered or not. If it is not registered, it will throw SECU0019 with a message that Foo is not registered
You will need to use this registration API to register your activity rule - pega_rules_utilities.pzRegisterActivity(tools, "Work-.Foo");
Hello Yining
Great question! Please review below my response, hope it helps!
Scenario 1: When rule pyBlockUnregisteredRequests is set to return false
Pega engine will not block the unregistered requests, you will not see HTTP 403 status code in the network trace, however Pega will still log SECU0019 alert code in the AlertSecurity log file ( so, letting you know that you still need to take care of these alerts)
Link below will provide additional information on the rules that govern the BAC feature
Scenario 2: When rule pyBlockUnregisteredRequests is set to return true
Pega Engine will block the unregistered requests, you will see HTTP 403 status code in the network trace and also SECU0019 in the Alert Security log file.
When the Engine receives a call for Work-. Foo, it verifies if Foo is already registered or not. If it is not registered, it will throw SECU0019 with a message that Foo is not registered
You will need to use this registration API to register your activity rule - pega_rules_utilities.pzRegisterActivity(tools, "Work-.Foo");
Further, this page will help to understand other registration APIs https://docs.pega.com/bundle/platform-88/page/platform/security/action-category-other.html
Please feel free to let us know if you have further questions.
Thank you
-
Yining Lu
Pegasystems Inc.
US
Hello all
Today we would like to present the topic "Recognizing BAC issues"
- Using the OOTB wizard you can easily identify the custom rules/code that are causing the BAC errors in your application.
- Simply run the tool "Access Control Check" from your Dev Studio
Follow the steps here on how to use this tool
https://docs.pega.com/bundle/platform-88/page/platform/security/use-access-control-checks.html
Please feel free to let us know if you are facing any issues using this tool OR have any questions in general about the BAC feature, we are here to help you!
Thank you
-
RAMA KRISHNA CHILLAMCHARLA Yining Lu Shivaji Kadiyam
Pegasystems Inc.
US
Hi Team,
Today we are sharing some best practices to avoid SECU0019 / HTTP 403 errors
- Refrain from using deprecated layouts(eg: Tab Group Layout), deprecated controls.
- Be on the lastest UI-KIT, Theme-Cosmos version applicable to the Pega Platform version.
- If the environment has been recently upgraded, check for harness, the old harness (in 7.x versions) uses Client runtime version 05-04, upgrade the client runtime version to 06-02. This change is irreversible, and once it is done, the Client runtime version field will not be visible.
Hi Team,
Today we are sharing some best practices to avoid SECU0019 / HTTP 403 errors
- Refrain from using deprecated layouts(eg: Tab Group Layout), deprecated controls.
- Be on the lastest UI-KIT, Theme-Cosmos version applicable to the Pega Platform version.
- If the environment has been recently upgraded, check for harness, the old harness (in 7.x versions) uses Client runtime version 05-04, upgrade the client runtime version to 06-02. This change is irreversible, and once it is done, the Client runtime version field will not be visible.
- Check custom controls, HTML/JSP code, and check if the use case can be re-designed to use OOTB configurations.
-
Yining Lu
Pegasystems Inc.
US
@Rachit_Agarwal Is upgrade the client runtime version as simple as pick version 06-02 and save the harness rule? Any follow up action needed after that, such as regression test etc.? May this change bring other issue or unwanted effects?
Pegasystems Inc.
US
@lu__y Yes, exactly we just change to pick the version 06-02 and save the harness rule. It is a recommened change, and should not require any regression testing. And ideally it should not bring any unwanted change.
-
Yining Lu
Updated: 15 Nov 2024 13:04 EST
Pegasystems Inc.
US
Hi Team, I would want to explain how to view the Secu0019 ALERT. This is how a common security alert Secu0019 appears.
2024-11-08 15:32:14,763 GMT*8*SECU0019*0*0*pega-web-nodeid-*NA*NA*H_browserrequestor*operatorid*classname*null*015c53c7a61e02096594544082ff74b2*N*1178*H_browserrequestor*6585*http--exec-65*TABTHREAD3*BACValidator*env| Proprietary information hidden*Activity=removeThead*Rule-Obj-Activity:removeThead*@BASECLASS REMOVETHEAD #20180713T131559.565 GMT Step: 4 Circum: 0*0*false*NA**NA*NA*NA*NA*NA*NA*NA*NA*Unauthorized request detected : Unregistered request encountered with params pyActivity:pyDeleteDocumentPg eventSrcSection:Link-Attachment.DownloadDocument*
So, we should always read from - "Unauthorized request detected......." and whatever is coming before that should be ignored as that is not related to Secu0019 Alert.
So, in this case we should read this is as Unauthorized request detected : Unregistered request encountered with params pyActivity:pyDeleteDocumentPg eventSrcSection:Link-Attachment.DownloadDocument*
DXC
AU
@Rachit_Agarwal We are using the script shared at the following article: https://support.pega.com/discussion/how-auto-logoff-window-cases-open-n… and we are getting Security-Broken Access Control warning for this.
Issues 1. Registration/Encryption of PUBLIC API's used in the script to avoid BAC issues
2. Dynamic generation of URLs which don't use encoding APIs should be flagged to avoid injection attacks, unauthorized data exposure and cross-site scripting attacks. Can you share insights on this how we are fix the following.
Pegasystems Inc.
US
Hello Gaurav
Please review below my response for Issue: 1
In pega_desktop_AppControllerLite JS rule (Pega-Desktop:08-08-01) you will notice that encryption API is used
e.g. pega.u.d.convertToRunActivityAction(oSafeURL);
So this should help to avoid triggering SECU0019. Similar APIs are used on other parts of the code.
Can you please review and see if this helps your scenario? Feel free to reach us back for any additional questions.
Regarding Issue: 2 that you mentioned can you please provide some additional context / clarification? Some screenshots of your configuration might help.
Thank you
Updated: 18 Nov 2024 18:15 EST
DXC
AU
@Elisha Tanikonda, yes and for that Access Control Health Check is giving the error. document attached for error screenshot.
Pegasystems Inc.
US
Hi @gasharma,
Seems like the py-cosmos-custom text file is customized here. The code highlighted would trigger a Secu0019 ALERT here.
We may need to make sure that the request are in encrypted format so that these are considered secure and does not trigger any Secu0019 ALERT.
Please refer to "Submitting the action request content in encrypted form" section in https://docs.pega.com/bundle/platform/page/platform/security/configure-…, where it is been asked to use Rule utility function pega_rules_utilities.pzEncryptURLActionString
in such scenarios.
I have also created a sample and attached a document "Launching a URL - BAC scenario..docx" where I also used the same function.
Regards,
Rachit
Updated: 18 Nov 2024 19:25 EST
Pegasystems Inc.
US
Hi Team,
Today we are sharing few examples, on how a BAC error looks like, artefacts that need to capture and then how to fix it.
1: Launch local action giving 403 error.
2. Open URL in a new tab is giving an error(similar use case as - launching pega portal from third party application is throwing 403/Secu0019 error, open pega portal/work object from email is throwing error).
Please take a look and let us know for any questions.
Pegasystems Inc.
IN
Hi @Elisha Tanikonda , @Rachit_Agarwal ,
Thank you for initiating this discussion.
Could you please help me understand when BAC issue comes how to identify whether its a invalid configuration or its registrations have to be added explicitly?
Thank you.
Updated: 20 Nov 2024 12:07 EST
Pegasystems Inc.
US
Great question @Priyanka Boga Please review below my response, I am hoping this will address the question to some extent.
- From the PegaRules Alert Security log, try to identify the source section (eventSrcSection) responsible for the BAC error
- Once you know the source, please see if you notice any deprecated controls. If you do, then, I suggest to replace those controls with the supported controls
- We need to make sure that we are not using any deprecated controls, before attempting to apply any registrations.
- As mentioned earlier in this space, Access Control Check tool will help identifying the custom controls, code blocks where encryption / registration needed.
My responses might not cover all the scenarios as the question is broad, but I believe this will give you the steps to debug in the right direction. Feel free to reach for any other questions.
Thank you
-
Priyanka Boga
Pegasystems Inc.
IN
@Elisha Tanikonda - Thank you Elisha. That helps!
-
Elisha Tanikonda
NCS Group
SG
Hi @MarissaRogers ,
Can I check with you here for the fallowing topics.
CROSS-SITE REQUEST FORGERY
CONTENT SECURITY POLICIES
cross-origin resource sharing (CORS) policies
Thanks,
Prameela M
Pegasystems Inc.
US
Hello Prameela
Thanks for your query! However this space is exclusively to discuss the queries related to BAC (Basic Access Control)
https://docs.pega.com/bundle/platform-88/page/platform/security/bac.html
Regarding your query on CROSS-SITE REQUEST FORGERY please review the documentation in case you haven't already reviewed https://docs.pega.com/bundle/platform/page/platform/security/cross-site…
Additionally you may post you query here https://support.pega.com/node/add/question
Thank you
Tata Consultancy Services
GB
Hello , we have a GDPR scenario where users need an ability to erase a portion of the case data (customers personal data) as part of our 'Right to be forgotten' requirement.. i see Pega OTB offers compliance case type along with few child case types for this purpose. we are trying to leverage these case types . and we have configured a CBAC rule at work level to erase certain data from pega cases. for some reason ,we are facing some challenges in building this functionality , i have submitted an Incident also for this. issues are mainly related to failing to pickup work level CBAC rule. however data level CBAC is picked up but data is not deleted from the data instances. would it be possible for you to share some documentation explaining the configurations that need to be setup for this requirement pls. pls note that i have configured the following access role in the access group .so there is no access related issues- PegaRULES:PegaAPIDataPrivacyAdmin.
Updated: 21 Nov 2024 10:56 EST
Pegasystems Inc.
US
Hi @SabeekA,
This space is specifically for the BAC(Basic Access Control) where the users see 403 error/Secu0019 ALERT. I however have found few articles on CBAC. Please have a look at it.
https://docs.pega.com/bundle/platform-23/page/platform/security/define-…
https://academy.pega.com/topic/defining-client-based-access-control-rul…
Alternatively, you can post you query to Pega Support center
https://support.pega.com/node/add/question
Regards, Rachit
Updated: 21 Nov 2024 10:31 EST
Pegasystems Inc.
US
Today's Topic: How to recognize and resolve BAC error for- ReloadSection, ReloadHarness
Pega Platform has enhanced the security of ReloadHarness and ReloadSection calls, so, we only allow the calls that are pre-registered along with all the Activity and DataTransform rules. Review below
Ensure the DSS (Dynamic System Setting) is set to true
RuleSet: Pega-Engine Purpose: security/validateReloadParameters Value: true
Examples of SECU0019 alert and Registration API:
1. ReloadSection Scenario:
PegaRules Alert Security log shows below alert
Unregistered request encountered with params pyActivity:ReloadSection eventSrcSection:Work-.pyDirtyCheckConfirm PreActivity:TestActivity PreDataTransform:TestDataTransform
Registration API applied: pega_rules_utilities.pzRegisterRefresh(tools,"SingleSection","TestDataTransform","TestActivity", null, null);
2. ReloadHarness scenario:
PegaRules Alert Security log shows below alert
Unregistered request encountered with params pyActivity:ReloadHarness eventSrcSection:Work-.pyCaseActionAreaButtons PreActivity: TestActivity PreDataTransform: TestDataTransform
Today's Topic: How to recognize and resolve BAC error for- ReloadSection, ReloadHarness
Pega Platform has enhanced the security of ReloadHarness and ReloadSection calls, so, we only allow the calls that are pre-registered along with all the Activity and DataTransform rules. Review below
Ensure the DSS (Dynamic System Setting) is set to true
RuleSet: Pega-Engine Purpose: security/validateReloadParameters Value: true
Examples of SECU0019 alert and Registration API:
1. ReloadSection Scenario:
PegaRules Alert Security log shows below alert
Unregistered request encountered with params pyActivity:ReloadSection eventSrcSection:Work-.pyDirtyCheckConfirm PreActivity:TestActivity PreDataTransform:TestDataTransform
Registration API applied: pega_rules_utilities.pzRegisterRefresh(tools,"SingleSection","TestDataTransform","TestActivity", null, null);
2. ReloadHarness scenario:
PegaRules Alert Security log shows below alert
Unregistered request encountered with params pyActivity:ReloadHarness eventSrcSection:Work-.pyCaseActionAreaButtons PreActivity: TestActivity PreDataTransform: TestDataTransform
Registration API used: pega_rules_utilities.pzRegisterRefresh(tools,"Harness"," TestDataTransform"," TestActivity", null ,null);
Refer to this page to know further on the registration APIs https://docs.pega.com/bundle/platform-88/page/platform/security/action-…
Please feel free to post your questions / queries on this topic. Thank you
Pegasystems Inc.
US
Thank you to @Elisha Tanikonda and @Rachit_Agarwal for being our experts in our session on Basic Access Control! And thank you to everyone who participated in this Ask the Expert session, whether it was asking questions or reviewing the helpful information shared!
What a great first session BAC! Thank you again!
This session is now closed to future replies. If you have any questions on Basic Access Control, please ask a new Question here in the Support Center!
Bookmark our Ask the Expert homepage to stay up-to-date on future sessions!
-
Elisha Tanikonda Rachit Agarwal