Identity Authentication Authorisation

From Discovery Data Service
Jump to navigation Jump to search

This version : (0-1 Draft)

Abstract

The Discovery Data Service (DDS) enables access to data by subscribers, the data having been sent to Discovery by publishers, and then securely stored.

Whilst some of the data held within Discovery is openly available, the vast majority of the data is sensitive personal data. In order to protect the privacy of that data, DDS operates a triple lock approach, which can be summarised as follows:

  • Lock 1. Data controllers must explicitly agree to the use of their data by subscribers via data sharing agreements. A data sharing agreement operates between a set of publishers and set of subscribers and the agreement describes the purposes of data sharing, the type of data being shared, and general consent policy followed by that agreement.
  • Lock 2. Data is only made available as defined by data sharing projects. A data sharing project is inherently tied to one data sharing agreement. The project defines data sharing for specific purposes and includes the exact means by which specified data is made available, including the format and the scheduling. Furthermore the data that is available as part of the project must be a subset of the data set within the data sharing agreement, and subscribers and publishers must be a subset of the subscribers and publishers signed up to the data sharing agreement.
  • Lock 3. Data is made available to particular systems or people using attribute based access control. In this mechanism, a subject, (who may be a system or user) , via an application, requests access to a resource, (which may be a data resource, application or component), to perform a certain action (which is usually a function or function description), in the context of an environment. One or more policies are established independently of the application, the policy containing rules that determine which attribute values of the subject, resource or environment are needed to provide permission.

This specification focuses on Lock 3 and this involves different types of activities with a number of different levels of security considerations.

Status of this document

This is the first and incomplete draft, focusing on some implementation capabilities required for the release of some utilities.

There have been no substantial changes since the previous version. For minor changes see the change log

Levels of management of identity, authentication and authorisation

Conceptually, DDS operates three levels of each of these three categories.

Identity management levels

DDS supports 3 level of identity management.

  • Level 0. Network level identity only. Personal Identity is unmanaged and unknown. DDS perhaps knows only the IP address , ports. The applications may use other standard artefacts such as cookies, but neither DDS nor the applications know the identity of the subscriber. Examples of this approach include access to the web site and this Wiki. Access may be blocked for security reasons
  • Level 1. Self managed identity. A user self registers with their personal details i.e. creates their own account. No one manages identity but people are identified. DDS reserves the right to block access if possible if misused. This would enable access to public facing applications such as regional dashboards or browsing the common information model, but would not be sufficient to enable access to data. In other words, identity is managed by exception.
  • Level 2. Managed identity. The identity of a user or system is ascertained, according to a trusted authority who is operating an identity service. This is likely to use a process of identity management delegation, depending to the likely level of authorisation that would be given to the user. For example, a General Practice would manage the recording of identity of it's staff as long as they followed the processes referred to by the data sharing agreements.

Identity management itself is not part of DDS. DDS assumes that identity has been ascertained. However DDS, supports identity management via managed authentication and managed authorisation.

Authentication levels

DDS supports 3 conceptual levels of authentication

  • Level 0. Network level authentication. This supports level 0 identity management and is managed by various infrastructure settings and application settings to block access or detect attacks.
  • Level 1. Single factor authentication. User would use a user ID and password, with a managed refresh interval. DDS uses the open ID connect protocol to enable a client (application) to verify the identity of the user against the authentication method employed by the DDS authorisation server.
  • Level 2. Two factor authentication. User would use a user id and password together with a device based token generating a number. The same protocol as level 1 is followed by DDS.

It should be noted at this point that authentication and identity may operate out of synchronisation (see the working example below). A particular person may authentication by level 0, level 1, or level 2 at different times. This is achieved by the use of roles.

Authorisation levels

DDS supports 3 conceptual levels of authorisation:

  • Level 0. Application managed authorisation. The user or system, by dint of authentication, can access any resource, or perform any action that the application itself has permission to use. In effect this means that the data controllers trusts the application (which may or may not be part of DDS) to have authenticated the user and no further permissions are required beyond those set by lock 1 and lock 2 data provisions. Access to sensitive data via this mechanism remains common practice in the NHS. DDS itself applies at least level 1 to 'systems' that have permissions to access data, allowing the system to handle end user authorisation, but over time, this is likely to be deprecated.
  • Level 1. Application managed role based access control (RBAC). A user, during the authentication process has been assigned a role. The role comes with a set of permissions derived from a template, a permission usually in the form of a code. The application uses the role codes to determine whether a user can access the resource or perform an action. The application itself must understand the relationship between the role based codes and the actions it is trying to perform.
  • Level 2. Attribute based access control. This extends level 0 and level 1 to support more granular rules and separates off the permissions system (known as the policy decision point). This operates by intercepting the APIs, connecting to an enforcement point that passes on the request to a decision point. The decision point examines the attributes of the request, searches for relevant policies, and operates a set of rules comparing the attributes of the resource, together with environment features, against the attributes of the subject, and request to determine whether permission to proceed is granted or not.

In practice DDS, operates a combination of level 1 and level 2 with ABAC support becoming the norm when accessing sensitive data, in order to support granular permissions in line with professional policy.

Working example

This specification uses this working example that takes a professional through a journey of acquiring multiple roles, each requiring different levels of identity management, authentication, and use of rule based authorisation policies.

Dr Lonsdale is a senior General Practitioner who is also involved in epidemiological research at the University of Muncaster and is a clinical information officer for Cumbria CCG.

Starting out, whats available to see?

One day she hears about the Discovery data service and goes to this Wiki, where she (rather spookily) reads about her journey. She does not enter any personal information. After reading the Wiki she becomes interested in browsing some of the public facing dashboards that are available and browsing the information model.

She clicks on the dashboard URL which brings up Discovery Explorer. Explorer requests a user id and password and also provides an option to "create account". Not having an account, Dr Lonsdale creates an account and enters her details, with her home email address as user id and a password from her 'low security list' of passwords she uses on public sites.

After having done this Explorer lets or on to the public dashboards. Explorer also shows her name and the fact that she has a role of 'General public'.

The next day she clicks on the information model URL which brings up the IM viewer. This also prompts for her user id and password, and her browser helpfully populates these. The IM viewer passes her directly on to the viewer application. She finds she can go back and forth from Explorer also without logging on again.

The next week she tries again to access Explorer using a different browser. She has forgotten her password so clicks on the 'forgotten password?' button. This asks here to verify her email and an email is sent with a link to re enter another password.

How are my practices doing?

After looking at the public dashboard she becomes interested in seeing how the practices in Cumbria are doing. Being a clinical information officer, the CCG agrees to create a user account for her, using her NHS email address. They send her an email which arrives with a link and she follows the link to add additional details such as her data of birth and a password.

But there is a problem. Whilst Dr Lonsdale can see the practices in Cumbria she does not have authority to see practices in Yorkshire. To solve this problem the CCG has created a policy that says that their clinical information officers can only view practice level data for those practices commissioned by Cumbria but can view CCG information for the country. Somehow, this constraint must be taken account of.

She logs on to Discovery Explorer, this time with her NHS email user id and new password. Explorer lets her in. She now sees that she has a role assigned as "Health care professional at Cumbria CCG". When she uses the dashboard, she now sees she can see practice level aggregate information. However, she can only see practice level information for practices in Cumbria.

What are the characteristics of patients with AF who are not anticoagulated?

The research department of Muncaster University have been given permission to analyse, at patient event level, de-identified data in relation to a list of patients with AF, compared with a control population.

Dr Lonsdale notes that whilst she can see the dashboard AF information, she cannot see patient lists, or build queries. So she contacts the CCG to see if they can 'up' her permission. The CCG cannot do this but they refer her to the local AHSN that has a data sharing agreement with Cumbrian providers to view patient level de-identified data, via Muncaster University’s secure data lake.

The AHSN assigns an additional role to Dr Lonsdale. Next time she logs on she is now offered two roles and she now selects "AHSN authorised Researcher at Muncaster University". She then states that this is her default role. She notices that the Explorer app has a new menu item ' Discovery Analyser'. She clicks on this which then directs here to a new URL but this appears blocked.

The system informs here that her level of authentication is currently insufficient to use Discovery Analyser. 2 factor authentication is required. She is given instructions that in order to access data she must download an app for her phone, scan in a bar code, and get set up for 2 factor authentication.

Having set this up she logs on to the application, this time entering a one time pass code and she can now access Discovery analyser where she can author reports and create record view concepts, and view de-identified patient lists.

Who are my patients who need anti-coagulation?

Dr Lonsdale knows there are good reasons why many patients who appear to require anti-coagulation don't get it. Chronic diseases, dementia etc. So she authors some more advanced filter reports to reduce the list somewhat. However, there are many borderline cases that should be considered on a case by case basis so she also authors advanced concept criteria which should display the relevant characteristics of patients when the record is accessed.

She is really interested in her own patients. As it currently stands she is unable to access identifiable lists but notices there is a link on Discovery Reporting and Discovery explorer called "Active patient link". On selecting this she is informed she does not have the rights to access this data.

This time she asks her practice manager to assign her a role in Discovery "GP at Ravenglass Railway Medical Centre". She is given instructions that in order to access data she must download an app for her phone, scan in a bar code, and get set up for 2 factor authentication.

When set up, she logs on, this time with the new third role, clicks the link and the user interface asks her for the one time pass code which she enters after selecting the phone app. She can now drill down and view her patient's records which are presented using the concepts she has already authored.

User accounts across DDS

Dr Lonsdale should preferably have a single user account across DDS. It may be the case that she has more than one account by dint of entering different details at some point, and as result of lack of, or perhaps failure of, identity management, but this would normally be avoided.

Her single account has a user profile which consists of:

  • An internal identifier
  • A profile consisting of a user name or device name, and for people, email addresses, mobile phone, and personal information such as forename, last name, gender, date of birth
  • A status, indicating whether here account is active or not.

Her account is associated with one or more roles as described below

Users roles and authentication levels

One person two roles

A user (via their account) may be linked to one or more roles. In the case of public access utilities that support self account creation, users who create their own accounts would have a role of "General public". Users who have their account created will also have their role assigned to an organisation.

Users who log on with self created accounts have the simplest of roles and normally require single factor authentication.

Some roles require two factor authentication before they can be assigned at log on. In the example, the second role as a GP role requires 2 factor authentication.


Roles and authorisation- RBAC and ABAC

RBAC-> ABAC

DDS uses an amalgam of simple role based access control and attribute based access control.

The architectural difference in implementation is significant.

In RBAC the application, using the session state of the user’s role, determines whether an action can be performed.

In ABAC, a policy enforcement point (PEP) is first accessed by intercepting the API. The PEP sends a request to a policy decision point (which may be remote) which then identifies policies relevant to the request, and processes rules using attributes from the user's role (which it independently accesses) , and tests them against a set of attributes that the policy requires, and then issues a response.

Such an approach enables a rule of any level of detail to be processed whether this is purely related to application functionality, or the attributes of the resource itself.

For example, it is theoretically possible without any additional application development work, to deny access to the clinical record of a specific X GP or perhaps any GP over the age of 60 who is over 6 ft tall and of a taciturn nature.

Job role, organisation, project assignment, as attributes

Job roles are modelled as 'has job role' attribute with the job type as values.i.e. most roles will have a job role attribute. This makes it easier to identify the role of a person simply by reading the job role. An example may be a Professor or Research assistant or a General Practice manager.

The main advantage of having a job role is that it provides a basis for templates that pre-define default role attributes and values. For example, it is likely that a General practitioner would have access to all the record of their patients. Thus attributes and values could be either inherited from (or copied from) the default template

Because DDS access is based around a publisher subscriber model derived from organisations, it would be the norm for most roles to be associated with an organisation which can then be used both for conventional data sharing (i.e. a user's role's organisation is a subscriber to data X) and also in any advanced rule ( can only see sensitive date fro their own organisation).

The data sharing project attribute provides an additional attribute type, enabling a user in ROLE A to be assigned to PROJECT P. so that only a certain set of data or functionality can be accessed according to the project configuration.

Functional authorisation - Obligations

It is all very well having a permissions system that says "permit" or "deny" for accessing an application function or data resource, but in the working example there are also some additional constraints on what levels of data access is allowed, by the different roles.

It is impractical to attempt to model advanced functionality within the policy definitions themselves. Therefore In order to facilitate this, a map is established between the application functionality (which many be very sophisticated) and the policy (which is bound to be relatively simple).

PDP obligating app function

The means by which the policy decision point informs the application of any additional constraints it must apply, is via the use of Obligations. An obligation may say "you have permission to access data A of you can confirm you will limit access to that data via functionality B".

In the working example, the application requirement is to be able to limit access to data at different levels of aggregation e.g. CCG, provider, or perhaps residential borough. In addition having accessed data at the level of aggregation, the list of providers at that level may be limited by some other set of relationships.

Thus a policy may state that certain roles can access only certain levels of aggregation, and at those levels can only access certain sources of data according to some attribute of the patient record. The policy is likely to define this as a simple functional attribute e.g. 'publisherConstraintFunction : userSTP'. This is then mapped by the application config into the query that restricts the provider list at this level.

Clearly, if the app already knows about the role of the user by dint of accessing the user's session role attributes, then in making the request the Policy Decision Point can test the user's attributes directly to provide permission without additional obligations

ABAC technical approach

The standard XACML , specifies a language that is commonly used to implement ABAC. XACML includes a set of grammatical concepts such as policy sets, policies, rules, combination rules, targets, attribute designators, obligations, effects and so with many and variable sophisticated tokens and functions used to process the rules. XACML has its own XML syntax that can be used directly.

DDS follows this standard approach from a conceptual perspective but simplifies this in two respects.

  1. Attributes and attribute values are modelled in the common information model's semantic ontology. Consequently subsumption testing on attributes may be used and all attributes and their allowable values can be viewed in the IM viewer. Role based attributes can be modelled and presented in the Discovery JSON syntax or one of the standard OWL2 syntaxes.
  2. Instead of using the XACML specific query syntax, the policy rules can be built using the Discovery standard query language, operating on those attributes. The standard query language is a profile of SPARQL with entailment regime in place. This then allows the same interpreters to be used on the attributes in the same way as any other attribute in the information model.

User session role and role attributes

A user is assigned to one or more roles. During the course of authentication a user selects one of the roles they wish to adopt for the session, which means that the user is operating in that role . The user's session role has a set of attributes which describe the user in more detail.

It should be noted that the attributes do not themselves indicate permissions. Instead, the attributes describe the user so that a policy can test whether the user's attributes are of the right level to access the resource or perform an action on it.

The authentication level (single or two factor) is also captured and assigned as an attribute, thus creating a session role, as many policies may require a user to be authenticated by 2 factors.

Here is an example JSON representation of a user in session. The actual class structure of a role may be somewhat different, but the use of attribute ids and values is used to match with a profile in the PIP. Note that in this example, no RBAC codes are included. Each attribute type is modelled as an object property or data property from the information model. Attribute values may be objects (as defined in the IM) and thus nested attributes can be included, those attributes being attributes of the object value of the outer attribute.

In this case the application assumes the prefix of "abac:" would resolve to "https://DiscoveryDataService.Org/InformationModel/ABAC" and that ":" would resolve to the core model IRI

Role record in JSON :

{"SessionRole": {
 "id": 12345,
 "name": "General Practioner at Ravenglass Railway medical centre",
 "Attribute": [
    {
	 "id": "abac:jobRole",                        
	 "value": [":GeneralPractitioner"]},          
    {
	 "id": "abac:atOrganisation",                
	 "value": {
                    "id": ":DM_odsCode",
                    "value": ["P12345"]}},            
    { 
        "id": "abac:hasProject",                     
        "value": ["P123",	"P456"]},            
    {
	"id": "abac:authenticationLevel",           
	"value": [2]} ]}}

Example 1 - General Public access to dashboards

Access request

In the first working example, Dr Lonsdale is a user in the General Public role. She has logged on to the application and wishes to access the NEL dashboards. Discovery explorer asks whether the NEL dashboard resource can be accessed and sends in a request, including the role of Dr Lonsdale, and the fact that she is authenticated with single factor,

Access request to view NEL public dashboards in JSON :

{
"Request": {
             "Namespace":[ {
                 "prefix": "abac",
                  "iri":"https://DiscoveryDataService.org/InformationModel/ABAC"},
                {    
                  "prefix": ":",
                  "iri":"https://DiscoveryDataService.org/InformationModel/SemanticOntology"}],     
             "AccessSubject": {
                "Attribute": [{
                                 "AttributeId": "abac:hasRole",
                                 "AttributeValue": [":CM_GeneralPublic"]
                                },
                                {
                                 "AttributeId": "abac:authenticationLevel",
                                  "AttributeValue": [1]} ]}]
		                },
                  "Resource": {
                     "Attribute": [{
                                     "AttributeId": "abac:accessApplication",
                                     "AttributeValue": {
                                         "AttributeId": "abac:accessDashboard",
                                             "AttributeValue": ["D-123344"]
                                                        }
				}
			]
		}
	}
}

Policy

As part of the data sharing agreement and project data sharing agreement, it has been agreed that the general public can only access CCG level aggregated information. However, the dashboards have been designed to enable drill down to practice level and below. Thus a policy is designed that indicates that the dashboard application MUST use the organisational aggregation function for this user.

Access request to view NEL public dashboards in JSON :

{"Rule": {
     "RuleId": 12312312333,
     "Effect": "Permit",
     "Description": "Allow subject to using the organisationAggragator",
     "Target": {
                 "Match": "{?resource abac:accessApplication abac:Dashboard"
               },
      "Obligation": {
             "OnPermit": {
                   "Function": [{
                                  "FunctionId": "OrganisationAggregator",
                                  "Parameter": ["CCG"
						]
					}
				]
			}
		}
	}
}


In the working example, Dr Londsdale is a user in the above role. She has logged on to the application and she wishes to access the NEL dashboards. The NEL dashboards provide CCG, STP, borough and county level dashboards covering the country. Discovery Explorer knows that organisational filtering is subject to policy and therefore makes an access request to access the NEL dashboards.

The request includes Dr Lonsdale's role attributes of

  1. Being a GP at RavenglassMedical centre,
  2. That she is authenticated to 2 factor
  3. She is part of the Discovery explorer project
  4. The resource she is trying to access is the NEL dashboards

Access request in JSON :

{
"Request": {
             "Namespace":[ {
                 "prefix": "abac",
                  "iri":"https://DiscoveryDataService.org/InformationModel/ABAC"},
                {    
                  "prefix": ":",
                  "iri":"https://DiscoveryDataService.org/InformationModel/SemanticOntology"}],     
             "AccessSubject": {
                "Attribute": [{
                                 "AttributeId": "abac:jobRole",
                                 "AttributeValue": [":GeneralPractitioner"]
                                },
                                {
                                  "AttributeId": "abac:atOrganisation",
                                  "AttributeValue": {
                                       "AttributeId": ":DM_odsCode",
                                       "AttributeValue": ["P12345"]
                                                    }
                                },
                                {
                                         "AttributeId": "abac:hasProject",
                                         "AttributeValue": [ 
                                                "P123",
                                                "P456"]
                                },
                                {
                                 "AttributeId": "abac:authenticationLevel",
                                  "AttributeValue": [2]} ]}]
		                },
                  "Resource": {
                     "Attribute": [{
                                     "AttributeId": "abac:accessApplication",
                                     "AttributeValue": {
                                         "AttributeId": "abac:accessDashboard",
                                             "AttributeValue": ["D-123344"]
                                                        }
				}
			]
		}
	}
}

ABAC Policy

A policy has been established whereby users can access NEL dashboards (any user). However, in order to have practice level aggregation permission a user needs to be a user at a practice. In addition, the policy also states that she can only access practices within her STP.

In order to establish the policy a number of resource attributes are also used and they are queried as a rule.