Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Change Control and Approvals

How datasets and geography change in MDS: drafts, submission, approval by maker-checker or through AWE, publication with an effective date, settings that apply at once, permissions, audit and the deli

In MDS, published data is never edited. Every change, to a dataset or to the geography, follows the same path:

The steps in the Admin UI are in the Admin Guide. The operations for each step are in the API Reference: Datasets, Geography and Releases.

Draft

  • A dataset has at most one open draft at a time; so does the geography.

  • A draft starts as a copy of the highest published version. The first edit opens one if none is open.

  • In a draft you can add, change and retire entries, and change the dataset's versioned details (dataset code, labels, hierarchy, schema). For geography: levels, units, change events and boundary files.

  • Some details are administrative and apply at once, outside the draft; see Details that change without a new version.

  • Entries are checked against the dataset's schema as they are written, so errors show while editing.

  • Consumers do not see a draft unless they ask for it.

  • A draft can be discarded. It is kept, marked discarded.

Submit

Submitting freezes the draft and asks for approval. The submitter gives a change note and, optionally, an effective date later than the approval (never earlier than the latest published version's).

MDS checks the whole draft again: labels, the entry hierarchy, every entry against the schema, references to other datasets (against their published versions; see Typed fields), fixed entry codes, and for geography the levels, units and change events. A draft with no changes is refused. For geography, MDS also adds automatic change events for changes left without one; see Change events.

Approval modes

A deployment chooses one mode (see Deployment):

Mode
How a draft is approved

permission (default)

Maker-checker inside MDS. A user with the publish permission approves or rejects. A rejection needs a note

awe

Through the Approval Workflow Engine. MDS opens an approval request on submit; AWE's policy decides the stages and approvers, and calls MDS back with the decision

permission: maker-checker within MDS

Maker ≠ checker is enforced: the approver must not be the person who created, last edited or submitted the draft. People are compared by their stable user id, never by display name, since two people can share a name. The admin UI hides buttons a user may not use, but the API enforces the rule.

awe: through the Approval Workflow Engine

  • There is one AWE policy for datasets and one for geography. The draft's publisher and change note travel with the request, where the policy can use them.

  • If AWE cannot be reached, submit fails and the draft stays a draft.

  • AWE's approval publishes the version; a rejection or cancellation marks it rejected.

  • MDS's own approve and reject operations are disabled. A submitted draft cannot be discarded in MDS; cancel the AWE request instead.

The callback and its signature are in the API Reference; the chart setup is on Deployment.

Releases

A catalogue release is approved by permission in both modes. Its publisher must be neither its creator nor whoever last set its members.

Publish

Publishing happens on approval. In one transaction, MDS checks the version once more, marks it published with its effective date, dates new and retired geography units, and, if the version is already in effect, refreshes the current data that consumers read. From then on the database refuses any change to it.

The change is then announced on the change feed, to the Audit Manager and, if configured, to WebSub. A version with a future effective date is announced again when it takes effect.

Details that change without a new version

Not everything about a dataset is versioned. Its description, publisher, theme, visibility and licence describe the dataset rather than its data, so changing them needs no draft and no approval: the change applies when saved (Dataset settings → Settings (apply at once) in the Admin UI). The same holds for the geography's visibility and licence. Each change is still recorded in the change log and sent to the Audit Manager.

Everything else (entries, the dataset code, labels, the hierarchy flag and the schema) is part of the data and changes only through a new version.

Permissions

The install sets these up; nothing is created by hand:

  • Keycloak gets the two roles below as client roles of the master-data client, and the admin user gets MASTER_DATA_ADMIN.

  • IAM gets the permissions and which role carries which, registered by the chart's IAM registration Job. MDS checks the permissions; a user has them through their role.

Reads need only a signed-in user.

Permission
Allows

referenceData:create

Create datasets; add entries through the original /attributes endpoints

referenceData:edit

Open, edit, submit and discard dataset drafts; change dataset details (including theme, visibility, licence); create releases and set their members

referenceData:delete

Retire entries in a draft; delete a dataset that was never published; delete a draft release

referenceData:publish

Approve or reject dataset drafts (permission mode); publish releases

geo:create

Add levels and units through the original /geo endpoints only

geo:edit

Open, edit, submit and discard the geography draft; set the geography's visibility and licence

geo:delete

Retire units in the geography draft

geo:publish

Approve or reject geography drafts (permission mode)

Role
Permissions

MASTER_DATA_ADMIN

All of the above

MASTER_DATA_APPROVER

referenceData:publish and geo:publish only: approves, cannot edit

Audit

MDS sends two kinds of events to the Audit Manager:

  • every API call: who called what, and the outcome. Anonymous calls are recorded only when they fail;

  • every catalogue change: each step of each version (draft, submit, approve, publish, take effect, …), each release step, and each administrative change.

Every change is first written to MDS's own change log, append-only, in the same transaction as the change. The change log feeds the change feed and is the outbox for delivery: events are sent after the change commits, and a relay in the API retries, at a regular interval (see Deployment), any that were not accepted. Delivery is therefore at least once; receivers de-duplicate on the event id. Events reach the Audit Manager as CloudEvents; see Standards.

Event
Audit Manager
WebSub

Every change

Yes

—

A version published, a version taking effect, a release published

Yes

Yes

In the Audit Manager, the two kinds are told apart by source: catalogue changes come from /openg2p/master-data, API calls from /openg2p/master-data-api. A catalogue change, for example a draft of the GENDER dataset submitted:

Column
Value

source

/openg2p/master-data

type

org.openg2p.master_data.list.draft.submitted

subject

list/GENDER/v2

actor_type, actor_id

user, the user's id (the token's sub)

resource_type, resource_id

master_data.list, GENDER

action, outcome

list.draft.submitted, success

details

{"actor": {"name": "Admin User"}, "context": {"module": "master-data-catalogue", "change_log_event_id": 220}, "details": {"list_code": "GENDER", "approval_mode": "permission", …}, "resource": {"version_no": 2}}

change_log_event_id is the event's id in MDS's change log. The event types and the WebSub topics are in the API Reference.

Last updated

Was this helpful?