M7-S2 — Applied security design: grants, protected fields, automations and credentials
Section titled “M7-S2 — Applied security design: grants, protected fields, automations and credentials”| Module | M7 — Secure the solution |
| After this session you can | Design and apply the security of a whole suite, people and programs together, and show that it holds. |
| Time | Facilitated: 51 min · On your own: 51 min |
| Before you start | M7-S1 if you came through ACD. Everything you built in Modules 2 to 6. Signed in as yourself; Hala Mansour in a private window; TOKEN, FEED and .tokens.json in your terminal. |
| Go deeper | Protect a field · Sensitive and encrypted fields: model and API · The security boundary |
◆ Orientation (1 min) — Security is a design, not a switch
Section titled “◆ Orientation (1 min) — Security is a design, not a switch”The suite now has two modules, a Function, a webhook, two OAuth programs, an API token and a public form. Each opens a way to the candidates’ data. R-13 and R-14 ask for protected salaries and passports and a form bots cannot flood, but the real requirement behind them is broader: every person and every program reaches exactly what it needs, and nothing leaks through the side doors you built in Modules 3 to 6. In this session you write that design, apply it, and test it.
▤ Concept (6 min) — The four layers of a suite’s security
Section titled “▤ Concept (6 min) — The four layers of a suite’s security”Layer 1: grants, as the product really behaves
Section titled “Layer 1: grants, as the product really behaves”The full ladder of permission levels is ACSA’s subject; the design uses these facts, verified on the running product:
- There is no deny. Access from every source adds up and the highest grant wins. Removing a grant removes only that grant; choosing Restricted on an entity takes back the access given there, and the person falls back to their system level.
- Edit includes everything Developer can do, plus browsing and changing records in Administration. Listing records in Administration needs Edit on the entity or its module; View is not enough. People normally work through views, which have their own access.
- System level Restricted hides the Services menu. Anyone who must apply for or act on a request in the portal needs at least View, which also shows a reduced Administration menu.
- Developer access is a builder’s power. A Developer on an entity writes its reactions, expressions and formulas, including reactions that run as System. Give it to trusted builders only, and review System reactions as you would review code.
Layer 2: protected fields, everywhere the value travels
Section titled “Layer 2: protected fields, everywhere the value travels”A Sensitive value is masked in lists, the record, its history, reports and exports. Through the
API, a read lists the fields the caller may not read in sensitiveMaskedFields; a filter on a
sensitive field the caller cannot read is refused with 400 SENSITIVE_FIELD_QUERY_NOT_ALLOWED;
a view’s OpenAPI document names a sensitive field but never shows its value. An encrypted
field goes further: nobody can filter, search, sum or group it, it cannot be used in reaction
conditions, reports or as a main title, it arrives empty in notification and email text, and
document templates show it masked. Turning Encrypt on or off for an entity that has records
is a structure change: those records must be upgraded, which encrypts or decrypts their stored
values.
Layer 3: what automations and integrations may reveal
Section titled “Layer 3: what automations and integrations may reveal”A reaction, a document template or a summary often runs for someone else. On an entity with a protected field, each has a Sensitive Data Access Policy:
| Policy | The element sees | Choose it for |
|---|---|---|
| Privileged (the default) | Always the real value | An automation that must use the value, deliberately |
| Prohibited | Always **** | Anything that never needs it, such as a webhook to a third party |
| User-Based | What the person who set it off may see | Actions a person triggers; not offered for System, Timer or On Time Exceeded |
| Auto | Privileged when the platform runs it, User-Based when a person does | Mixed triggers; not offered on summaries |
Under a masking policy, an action that would write a mask over a real value, or send one out by Call API or email, fails instead; notifications, files and announcements may pass the mask on. Values from protected fields never appear in a reaction’s history in clear.
Layer 4: who holds which credential
Section titled “Layer 4: who holds which credential”One application user per integration per environment, reaching one view each; OAuth for people, whose own access applies (scopes release claims, they do not narrow data); anonymous tokens and Anonymous views for visitors, showing only fields meant for the public; Human Verification on public forms; tokens kept in configuration, rotated on a schedule, revoked knowing the five-minute delay. The gateway strips identity headers, so a client can never claim to be someone else.
The applied threat model
Section titled “The applied threat model”A threat model lists, for each way in, what could go wrong and what stops it. For the suite:
| Threat | Mitigation in the design |
|---|---|
| The careers token leaks | Its user reaches two views only; per-environment users; regenerate, or archive to revoke |
| Bots flood the public form | Human Verification on the public view; the validator refuses impossible values |
| A webhook leaks personal data | The payload is built only from mapped fields; its policy is Prohibited |
| An over-privileged automation | System executor used once, named, reviewed; everything else Executor or default |
| A curious colleague | Sensitive and Encrypt with grants to HR only; every reveal is audited |
| A client claims another identity or tenant | The gateway overwrites identity headers and takes the tenant from the host |
| A public view shows too much | A separate public view with public fields only; never reuse an internal view |
⛏ Lab (36 min) — Protect, restrict and prove
Section titled “⛏ Lab (36 min) — Protect, restrict and prove”Goal. Salaries visible to HR only, passport numbers encrypted, the payroll webhook unable to leak a protected value, the public form behind human verification, and proof from three sides.
Before you start. Signed in as yourself.
Protect the fields
- Edit Job Application. Open Expected salary, turn on Sensitive, and in Select groups choose HR.
- In the Job offer details block, add a Text field Passport number. Turn on Encrypt, and in Select groups choose HR. Select Save and Save Changes.
- If the designer reports records to upgrade, select Upgrade Records for them.
Decide what automations may reveal
- Open the reaction Notify payroll of a hire. Its form now shows a Sensitive Data Access Policy: choose Prohibited. Confirm.
- Open Calculate offer package and Call Start onboarding: neither uses a protected field; set Prohibited on both too, so a later edit cannot leak one by accident.
Close the public door
- Open the view that offers the Job Application form to visitors, go to its Access Permission settings, make sure Anonymous is on, and turn on Human Verification.
Screenshot pending The Expected salary field settings with Sensitive on and the HR group selected, and the Passport number field with Encrypt on What to notice: turning on Encrypt turns Sensitive and Searchable off; the two protections never sit on one field.
Prove it from three sides
-
A person without access. As yourself, a system administrator outside HR, open Tariq Mansour’s application: Expected salary shows
****, with no way to reveal it. -
A person with access. As Hala Mansour, open the same application. Expected salary shows
****until she selects Unmask and confirms who she is; then she sees 15000. -
A program. With the careers token, read Careers feed once more: nothing changed, because that view never showed a protected field. Then read one application as Hala through HR view without unmasking:
Terminal window curl -s -G "$BASE/api/v1/v/$HRVIEW/v3/entities/job_application/entries" \-H "Authorization: Bearer $(jq -r .access_token .tokens.json)" \--data-urlencode 'search=Tariq' --data-urlencode 'filterCriteria={"limit":1}' \| jq '.entries[0] | {salary: .value.expected_salary}'The salary comes back masked, not 15000. A list read does not say which fields are masked; a read of the single record does, on its entity: a field Hala could unmask is listed in
sensitiveMaskedFieldsWithUserAccess, a field she has no grant for insensitiveMaskedFields. -
The webhook. Edit Notify payroll of a hire and, as a test, add
"salary": "{{salary}}"to its payload, mapped to Expected salary. Sign Nour Hamdan’s contract as Hala Mansour: the call fails rather than send a mask, and HR is notified by your failure branch. Remove the line again.
Write the design
- Write Meridian’s security design on one page: a table with one row per audience and per program (HR, IT, interviewers, candidates, the careers site, payroll, the wall screen, builders), and the columns Reaches · Through · Protected fields seen · Credential · Why; then the threat table for the suite.
Check.
- Expected salary is Sensitive for HR; Passport number is Encrypted for HR.
- The payroll, offer and onboarding reactions are Prohibited.
- The public form has Human Verification.
- You saw
****as yourself, the value only after Unmask as Hala, and the value masked through the API. - The test webhook with the salary failed and reached the failure branch, and is restored.
- Your design covers every audience and program, with a reason for each.
Pass condition. The three proofs match the design: no one outside HR can see a salary or a passport number by any route, no automation can send one out, and the design explains every grant.
If something goes wrong
| What you see | What to do |
|---|---|
| Encrypt turns itself off after saving | The field type cannot be encrypted (reference, block, switch, category). Use a Text field. |
| Encrypted values cannot be saved | Your operator has not set up the encryption keys for this environment. Ask; note it in your design. |
| No Sensitive Data Access Policy on a reaction | The entity has no protected field yet: save step 1 first. |
Hala sees **** and no Unmask | She is not in HR, or the grant is on another field. |
The test webhook succeeded and sent **** | Its policy is not Prohibited, or not saved. |
Model answer
Security design (extract).
| Who | Reaches | Through | Protected fields seen | Credential | Why |
|---|---|---|---|---|---|
| HR | Applications, jobs, worklist | HR view, HR worklist, Inbox | Salary (after Unmask), passport (one at a time) | Their own sign-in | They run hiring |
| IT | New hires, checklists | IT onboarding desk | None | Their own sign-in | Onboarding needs no salary |
| Interviewers | Their own steps | Inbox | None | Their own sign-in | They judge candidates, not pay |
| Candidates | The public form, open jobs | Available jobs, the service | None | None (anonymous), with human verification | Public |
| Careers site | Open jobs; new applications | Careers feed, Careers intake | None | API token of Careers Site, per environment | The narrowest door that works |
| Payroll | Nothing in the suite | It receives notices | None (policy Prohibited) | A key it issued, in a header | We call it |
| Wall screen | HR’s worklist, live | HR worklist, live channel | None | A kiosk account’s OAuth session | Live channel needs OAuth |
| Builders | The design | Administration | None | Developer on the two modules | Expressions and System reactions are code |
The threat table is the one in the applied threat model, with one addition found in the lab: the webhook test proved that a masking policy turns an accidental leak into a visible failure.
◇ Worked scenario (1 min) — The analytics request
Section titled “◇ Worked scenario (1 min) — The analytics request”Finance asks for a nightly export of every application, with expected salaries, to their analytics tool, “to model hiring costs”. Decide before reading on.
Do they need salaries per person? They need costs by department and month. Decision: a statistic summary of Expected salary grouped by department, whose policy is Privileged because it shows only totals, published to Finance; no per-person salary leaves HR.
If they insist on records. Decision: a dedicated application user Finance analytics with a view showing department, month and salary, granted Expected salary access deliberately and documented in the design, a nightly read over the API, and a review date.
What never happens. A shared HR token, or a webhook that sends salaries out with a Privileged policy because “it is only internal”. Every exception is a row in the design.
✓ Practice (6 min) — Check your design
Section titled “✓ Practice (6 min) — Check your design”A colleague proposes None on a contractor for Applications to “make sure” he never sees them, though his group grants View. What happens?
Check your answer
The correct answer is B. Open the explanation under each option to see why.
A webhook to an insurance partner must never send a salary. Which setting makes an accidental leak fail loudly instead?
Check your answer
The correct answer is B. Open the explanation under each option to see why.
An HR dashboard sums Monthly allowance by department. Security asks to encrypt the field. What do you answer?
Check your answer
The correct answer is B. Open the explanation under each option to see why.
Which mitigation answers “a leaked integration token”?
Check your answer
The correct answer is B. Open the explanation under each option to see why.
Interviewers must approve applications in their Inbox. Their base level is Restricted. What happens?
Check your answer
The correct answer is A. Open the explanation under each option to see why.
↺ Recap (1 min) — After Module 7
Section titled “↺ Recap (1 min) — After Module 7”You wrote and applied a security design across people, automations and programs, and proved it from three sides. After Module 7 you can secure a solution: least-privilege grants, protected fields, what automations and integrations may reveal, and the right credential for every caller, with the threats each choice answers.
Next. Module 8 ships it: the two modules, their Functions and their reactions, packaged and promoted to another environment.