This page lists how the API decides who may call what. It is taken from the authorization code and the controller attributes.

1. Signed-in account

  • Every endpoint requires an authenticated caller with an active OilGas account. This is the default and the fallback policy. An account counts as active when the API itself has issued a party identity claim and an active-account claim for it.
  • Anonymous endpoints are /health and /health/repository. The account state endpoint under /api/auth/repository accepts any signed-in caller so that it can tell a disabled account what is wrong.
  • A small set of first-time setup paths is protected by a setup key instead of a sign-in, because the identity store may not exist yet.

2. The first administrator

The first person to complete the first registration of a new installation receives the Administrator role. The code creates the role if it is missing, adds the person to it and records the reason "First OilGas registration". A singleton bootstrap record makes sure only one registration can win. Later registrations do not receive the role.

3. Roles named in the code

Role names are plain strings checked with the framework's role authorization. Administrators can also create more roles through the API (see section 6), so this list covers only the names the code itself checks.

RoleWhere it is required
AdministratorMost administration endpoints: access control and grants, asset hierarchy, role and persona administration, user management policies, initial company setup, module and system repository setup, PPDM39 setup, lease acquisition creation and status changes, and the Failures page.
Accountant or AdministratorAccounting period checks (GET /api/field/current/accounting/period-checks) and closing a period (POST /api/field/current/accounting/close-period, which also needs write access to the field).
GateApproverThree actions on gate reviews under /api/field/current/gates. The gate review pages in the web application also admit Manager and Admin.
ComplianceOne action in the business process compliance controller (/api/field/current/process/compliance).
Supervisor, Manager or AdminDeleting a work order (DELETE /api/field/current/workorder/{instanceId}).
Admin or AdministratorConnection management (/api/connections) and the demo database endpoints (/api/demo).

4. Named policies

PolicyRule
Admin.ManageUsersThe caller has an active account and the Administrator role.
Admin.AssignRolesThe caller has an active account and the Administrator role.
HSE.ManageIncidentsThe caller has an active account and a permission claim with that value.
HSE.ReportIncidentThe caller has an active account and a permission claim with that value.

5. Permissions

The permission names are constants in PermissionConstants. They are grouped by area, for example Admin, Security, DataManagement, Inventory, Procurement, Accounting, Tax, EconomicAnalysis, WellManagement, Production, ProductionForecasting, ProductionAccounting, Reservoir, Drilling, Completions, Facilities, Pipeline, NodalAnalysis, WellTestAnalysis, ChokeAnalysis, CompressorAnalysis, GasLift, PumpPerformance, SuckerRodPumping, PlungerLift, HydraulicPumps, EnhancedRecovery, HSE, Environmental, Regulatory, Exploration, ProspectIdentification, LeaseAcquisition and DevelopmentPlanning. A permission name has the form Area.Action, for example HSE.IssuePermit, Production.AllocateProduction or NodalAnalysis.RunVLP.

Which role holds which permission is stored data that an administrator manages (see the role permission endpoints below). It is not fixed in the code, so this documentation does not list default grants.

Access to a particular field, well or other asset is a separate check: POST /api/AccessControl/check-access answers whether a user has access to an asset with a given permission, and administrators grant or revoke asset access.

6. Administration endpoints

Roles and users

MethodRouteBodyQueryAccess
GET/api/identity/rolesrole Administrator
POST/api/identity/rolesrole Administrator
GET/api/identity/roles/catalogrole Administrator
GET/api/identity/roles/permissions/catalogrole Administrator
GET/api/identity/roles/users/{targetUserId}/assignmentsrole Administrator
POST/api/identity/roles/users/{targetUserId}/assignmentsAssignRoleRequestrole Administrator
DELETE/api/identity/roles/assignments/{userRoleId}role Administrator
GET/api/identity/roles/tenants/{tenantId}/companies/{businessAssociateId}/users/{targetUserId}/accessrole Administrator
POST/api/identity/roles/tenants/{tenantId}/companies/{businessAssociateId}/membershipsCompanyMembershipRequestrole Administrator
GET/api/identity/roles/tenants/{tenantId}/companies/{businessAssociateId}/users/{targetUserId}/assignmentsrole Administrator
POST/api/identity/roles/tenants/{tenantId}/companies/{businessAssociateId}/users/{targetUserId}/membership-retirementsCompanyMembershipRetirementRequestrole Administrator
GET/api/identity/roles/tenants/{tenantId}/companies/{businessAssociateId}/users/{targetUserId}/membership-retirementsoffset, limitrole Administrator
POST/api/identity/roles/tenants/{tenantId}/companies/{businessAssociateId}/users/{targetUserId}/assignmentsAssignCompanyRoleRequestrole Administrator
DELETE/api/identity/roles/tenants/{tenantId}/companies/{businessAssociateId}/assignments/{userRoleId}role Administrator
GET/api/identity/roles/{roleId}/permissionsrole Administrator
POST/api/identity/roles/{roleId}/permissionsGrantPermissionRequestrole Administrator
DELETE/api/identity/roles/permissions/{rolePermissionId}role Administrator
GET/api/identity/userspolicy Admin.ManageUsers
GET/api/identity/users/{targetUserId}
PUT/api/identity/users/{targetUserId}RepositoryUserUpdate
GET/api/identity/users/{targetUserId}/roles
POST/api/identity/users/{targetUserId}/rolesUserRoleChangeRequestpolicy Admin.AssignRoles
DELETE/api/identity/users/{targetUserId}/roles/{roleName}policy Admin.AssignRoles

Asset access, hierarchy and profiles

MethodRouteBodyQueryAccess
GET/api/AccessControl/user/{targetUserId}/stored-grantsoffset, limitrole Administrator
GET/api/AccessControl/fields/{fieldId}/interest-reviewrole Administrator
POST/api/AccessControl/stored-grants/{grantId}/retireBeep.OilandGas.Models.Data.AccessControl.RetireAssetGrantRequestrole Administrator
GET/api/AccessControl/stored-grants/{grantId}/retirementsoffset, limitrole Administrator
POST/api/AccessControl/check-accessAccessCheckRequest
GET/api/AccessControl/user/{targetUserId}/assetsassetType, organizationId, includeInherited
GET/api/AccessControl/user/{targetUserId}/rolesorganizationId
GET/api/AccessControl/user/{targetUserId}/permission/{permissionId}organizationId
POST/api/AccessControl/grant-accessGrantAccessRequestrole Administrator
POST/api/AccessControl/revoke-accessRevokeAccessRequestrole Administrator
GET/api/AccessControl/role/{roleId}/permissionsorganizationIdrole Administrator
POST/api/AccessControl/role/{roleId}/permission/{permissionId}organizationIdrole Administrator
DELETE/api/AccessControl/role/{roleId}/permission/{permissionId}organizationIdrole Administrator
GET/api/AssetHierarchy/organization/{organizationId}rootAssetId, rootAssetType, rootFacilityTyperole Administrator
GET/api/AssetHierarchy/user/{targetUserId}organizationId, rootAssetId, rootAssetType, rootFacilityType
GET/api/AssetHierarchy/asset/{assetId}/{assetType}/childrenorganizationId, facilityTyperole Administrator
GET/api/AssetHierarchy/asset/{assetId}/{assetType}/pathorganizationId, facilityTyperole Administrator
POST/api/AssetHierarchy/validate-accessValidateAccessRequest
GET/api/AssetHierarchy/organization/{organizationId}/configrole Administrator
PUT/api/AssetHierarchy/organization/{organizationId}/configList<HierarchyConfig>role Administrator
GET/api/UserProfile/{targetUserId}
GET/api/UserProfile/{targetUserId}/rolesorganizationId
GET/api/UserProfile/{targetUserId}/default-layout
PUT/api/UserProfile/{targetUserId}/preferencesUpdatePreferencesRequest
PUT/api/UserProfile/{targetUserId}/primary-roleUpdatePrimaryRoleRequest
PUT/api/UserProfile/{targetUserId}/preferred-layoutUpdatePreferredLayoutRequest
POST/api/UserProfile/login

Personas

A persona is a named working view (workspace) that can be mapped to a role. The persona endpoints list the catalog, show the workspaces for the current user, and let administrators map workspaces to roles.

MethodRouteAccess
GET/api/personas
GET/api/personas/workspaces/current
GET/api/personas/roles/{roleId}/workspacesrole Administrator
PUT/api/personas/roles/{roleId}/workspaces/{code}role Administrator
PUT/api/personas/{code}role Administrator
GET/api/personas/users/{targetUserId}
PUT/api/personas/users/{targetUserId}
GET/api/personas/users/{targetUserId}/preferences/{code}
PUT/api/personas/users/{targetUserId}/preferences/{code}/{viewKey}

Row level checks

MethodRouteBody
POST/api/identity/security/check-row-accessCheckRowAccessRequest
POST/api/identity/security/apply-row-filtersApplyRowFiltersRequest
POST/api/identity/security/check-source-accessCheckSourceAccessRequest
POST/api/identity/security/check-database-accessCheckDatabaseAccessRequest
POST/api/identity/security/check-datasource-accessCheckDataSourceAccessRequest
GET/api/identity/security/accessible-fields
GET/api/identity/security/accessible-assets
GET/api/identity/security/accessible-organizations

7. In the web application

PageRouteAccess
Users/admin/access-control/usersAdministrator
Assign User Roles/admin/access-control/user-rolesSigned in; the API calls it uses are administrator calls
Asset Access/admin/access-control/asset-accessAdministrator
Organisation Hierarchy Configuration/admin/access-control/hierarchy-configAdministrator
Failures/admin/failuresAdministrator
Company members/setup/company-membersCompany membership setup
Gate Reviews/ppdm39/process/gatesGateApprover, Manager or Admin