Security test cases
The Test cases tab of Security simulation keeps the non-regression of a JD Edwards EnterpriseOne security project. A case is a list of expectations about one user, role or *PUBLIC — may run P4210, may not delete in P0411 — and Run all replays every case against the security as it is now. After a change in the Security Workbench, a role merge or a promotion, the list says what no longer holds and which rule now decides.
Cases are kept in Nomajde's own database; replaying them only reads JD Edwards.
At a glance
The list of cases
Run all replays every case; Add the samples adds the sample cases. The tab title shows how many cases there are.
| Column | Content |
|---|---|
| Case | The name given when the case was saved. |
| About | The user, role or *PUBLIC the expectations are about. |
| Expectations | How many expectations the case holds. |
| Last run | When the case was last replayed, or never. |
| Passed / Failed | What the last run gave: the failed count is red when an expectation broke, green at 0. |
| — | Run replays this case, Edit opens the editor, Delete removes the case and its expectations. |
A case is made in three ways: saved from a simulation (every object and right of the answer becomes an expectation), added from the samples, or written by hand in the editor from an existing case.
What no longer holds
After Run or Run all, a banner says Every expectation holds., or the list What no longer holds opens under the cases, with how many lines:
| Column | Content |
|---|---|
| Case | The case the expectation belongs to. |
| Object, Right | The object and the right — run, add, change or delete. |
| Expected | What the case expects: yes or NO. |
| The security says | What the security as it is gives now. |
| Decided by | The line that decides now, as who on what — or no rule when nothing forbids it. |
The user is replayed with the roles held on the day of the run, as for a simulation. The passed and failed counts are kept on the case.
Sample cases
Add the samples adds five cases written for typical roles. Each names a placeholder role, to replace with one of yours:
| Sample | About | What it expects |
|---|---|---|
| Accounts payable clerk | APCLERK | Enters vouchers (P0411: run and add), never deletes them; does not pay (P0413M), does not maintain suppliers (P04012) nor post to the ledger (P0911). |
| Sales order entry | SALESORDER | Enters orders (P4210: run and add); does not maintain customers (P03013), prices (P4106) nor credit (P03B11). |
| Buyer | BUYER | Enters purchase orders (P4310: run and add); does not receive goods (P4312), enter vouchers (P0411) nor maintain suppliers (P04012). |
| Inquiry only | INQUIRY | Opens P0411 and P4210 and changes nothing: add, change and delete refused. |
| Nobody but administrators manages security | *PUBLIC | Nobody opens the security applications (P00950, P0092, P95921, P98OWSEC). Keep *PUBLIC, or pick an ordinary role. |
A sample already added — changed or not — is never overwritten: adding the samples again only adds those missing, or says The samples are already there. Until its role is replaced, a sample fails or speaks of a role JD Edwards does not have.
Editing a case
Edit on a row opens the case above the list.
| Field | Use |
|---|---|
| Name | The case's name; it can be changed, as long as no other case has it. |
| About (user, role or *PUBLIC) | Who the case is about. When it is not a user or a role of this JD Edwards — the placeholder role of a sample — a warning says so: pick one of yours. |
| Note | Free text; the samples explain there what the role is meant to do. |
| Expectations | One line each: Object, Form (optional, for an expectation on one form), the right (run, add, change, delete) and allowed or refused. Remove takes the line away; Add an expectation adds one. |
Save the case replaces the case as a whole, its expectations included; lines without an object are dropped. Cancel closes the editor without saving.
Access
The tab is part of the Security simulation page, in the Security Maintenance folder; the predefined roles Security administrator and Administrator hold it (see Predefined roles). Saving, editing and deleting a case writes only to Nomajde's database.
Tips & best practices
- One case per role, named after what the role is for: a failed expectation then points at one role.
- Keep the refusals. The expectations that matter most are often the NO: a supplier maintenance that an accounts payable clerk must not reach, a security application that nobody but the administrators may open.
- Run all after every change to the Security Workbench, after Re-merge security and after a promotion of security to another environment.
- Start from the samples: replace the placeholder role, adapt the objects to the applications the customer uses, then add the expectations specific to the business.