-
Notifications
You must be signed in to change notification settings - Fork 419
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Guidance on anonymization/pseudonymization #68
Comments
Thanks for filing this issue with all the details. I assume by default the "original" field would always contain the original object? If we would have a field |
We have to allow for that, while also allowing the user to remove the original data. Depends on the business needs and applicable compliance rules.
It can be a prefix or a postfix, does not make a difference w.r.t. how much effort it takes to create the Field Level Security rules. I also like postfix more because of the reasons you mentioned. |
Is there an easy way to do |
I tested it real quick, seems to work just fine, luckily :). PUT flstest
PUT flstest/doc/1
{
"name.pii1": "secret",
"name.pii2": "fd9adsfSADF"
}
GET flstest/doc/1
POST /_xpack/security/role/flsrole
{
"indices": [
{
"names": [
"flstest"
],
"privileges": [
"read"
],
"field_security": {
"grant": [
"*.pii2"
]
}
}
]
}
POST /_xpack/security/user/flsuser
{
"password": "s3cr3t",
"roles": [
"flsrole",
"kibana_user"
]
}
POST /_xpack/security/role_mapping/flsmapping
{
"roles": [
"flsrole"
],
"enabled": true,
"rules": {
"field": {
"username": "flsuser"
}
},
"metadata": {
"version": 1
}
} As
Response:
|
Thanks for testing. Good to hear prefixes also work. I assume it doesn't make a difference if it is |
Getting the same results on |
Nice. So now we should tackle the bigger question: How do we fit this into ECS? So far ECS purely focuses on the field definitions. I definitively see like how this makes sense "on top of ECS" and should be part of it. But where do we put it and how do we describe it? @MikePaquette Ideas? |
@ruflin @loekvangool Sorry this has lagged so long without comment. I wonder if this could be an "ECS Extension for Personal Data" that we can define, rather the defining the actual fields? I definitely like the postfix approach better than prefix for the reasons you've agreed upon. Fields with the If this is acceptable, I could fold this into a big 'ol PR on the README.md |
@MikePaquette sounds good. Reading my own post again, I think there is one additional item: We should consider to add guidance on naming conventions for anonymized fields. Anonymized data cannot be reversed, and should not have a constant salt, hence referential integrity is lost, and probably |
@loekvangool I think we agree that ECS should not attempt to specify what constitutes anonymization, but rather it should define a convention for storing pseudonymized and/or anonymized data in fields with a defined set of postfixes and a defined order of increasing anonymity. So are you saying that the fourth level (assuming we define 4 of them) would be defined as anonymized? And thus the index mapping template should not bother to index fields with this fourth postfix? |
@MikePaquette I agree we should not take a stand in that discussion, such a complex area with opinions on definitions etc. We also can't say that PII4 is anonymized. It might as well be non-personal data altogether. No I guess I'm proposing to add a line like "if you anonymize data, and there is no consistent hashing used, append It doesn't take long to see that this line of thinking could lead to multiple flags being added to the field names leading to the usage of wildcards on both sides in the dynamic mapping (such as "source.ip.pii2.anonymized": {
"type": "ip",
"index": false
} vs: "source.ip": {
"type": "ip",
"pii": "2",
"anonymized": true
} |
Thanks @loekvangool I see. I am wondering if this (special treatment for anonymized fields) might be an optimization that is too complex, or beyond the scope of ECS. I will attempt to document this concept for the README.md, and would welcome your feedback. |
Sounds good
|
A similar topic was raised in a discussion around GDPR. I think one thing that ECS can do here is coming of with a convention of how to name such fields. My current suggestion would be a
Taking
The fields with the postfix I would expect normally to be a |
Just a clarification on Elasticsearch mappings (I can't dive deep into this anonymization question, on the eve of the Beta1 release of ECS :-) ). A given field that's already defined in the mapping (such as In other words, they will need to be in distinct fields (not nested under another one), like those @ruflin is suggesting. Concretely: cannot be |
Agreed, otherwise it will not be possible. Probably good to include a warning in the guidance to make sure people don't make this error. |
Maybe good to note that there are (at least) two topics:
The way PII is defined (again looking at https://nvlpubs.nist.gov/nistpubs/legacy/sp/nistspecialpublication800-122.pdf), it seems that a hashed version of a field should lead to a lower PII score because it's less harmful if publicized. But that determination is subjective and in the hands of the CISO. I conclude [1] Note to self: Maybe check the performance on double wildcards... |
It's definitively nice if all the above is possible as it gives the creator of the data a lot of flexibility. As you mentioned we should definitively test double wildcards. I wonder how much we need to define on the ECS side and how much we leave to the user. To get start just defining that _* should be used would probably be enough. |
Since changing the name of fields is inherently destructive to ECS's advantages (which is, in essence, the predictability of field names), I would still opt for the introduction of field metadata to implement PII: "properties": {
"source.ip": {
"type": "ip",
"pii": 2,
"scrambled": true
}
} Or: "properties": {
"source.ip": {
"type": "ip",
"metadata": {
"pii": 2,
"scrambled": true
}
} The second example is on-par with the way we do User Metadata today: POST /_xpack/security/user/jacknich
{
"password" : "j@rV1s",
"roles" : [ "admin", "other_role1" ],
"full_name" : "Jack Nicholson",
"email" : "[email protected]",
"metadata" : {
"intelligence" : 7
}
} https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-user.html |
I might miss something here. Is |
Good point @ruflin those examples were a bit ambiguous, I changed them. I do mean adding field metadata to Mappings, which then should be usable in Security:
|
Were you thinking of metadata per field, something like this? elastic/elasticsearch#33267 |
Yes that's it. |
wouldn't the anonymization/encryption be useful not just outside ECS but even outside Elastic-Search? |
So if I get you you're basically talking about storing obfuscated data in Elasticsearch and have it reversible to the original data in an external tool? Can you elaborate on what's stopping you from doing that in Elasticsearch today? |
yes. I don't think there is anything preventing me from doing that in ES -- the question was whether folks may be interested in having that as the answer to the anonymization problem stated above. If it would take some work in the ELK, then only in the K-part. |
I'd like to propose that ECS adds guidance for anonymization and pseudonymization. Some thoughts:
Definitions
PII model
The NIST 800-122 publication on PII identifies levels of personal identifiable information:
Typically if one is allowed to see PII level
X
, one can also see PII levels< X
(the Air Force One uses the same method: walk freely towards the rear, but never walk forward of your own seat). We could also imagine puttingpii_<level>
as a pre- or postfix in field names to easily manage Field Level Security (because it supports access based on wildcards (*
)).Varying levels of obfuscation
We should also recognize that various versions of the same field can (and should) exist in harmony. Perhaps the Dutch postal code system is a good example:
postalcode: 1234AB
The system is set up so that each character to the right is adding more precision to the location.
Perhaps in Elasticsearch this becomes:
customer.postalcode.raw: 1234AB
customer.postalcode.city: 12
customer.postalcode.obfuscated: E32DB25A9BAAA6AF655FE65A861C9BD35AF1868229E0E9D738236B4500626AFB
Or, implementing PII:
customer.postalcode.pii4: 1234AB
<-- perhaps enough to identify the customercustomer.postalcode.pii2: 12
<-- not enough to identify the customercustomer.postalcode.pii1: E32DB25A9BAAA6AF655FE65A861C9BD35AF1868229E0E9D738236B4500626AFB
<-- not enough to identify the customer, but based on PII 4 data hence we can bucket customers of the same street without knowing which street it is.The above would allow various users to access the postal code at an appropriate level for their usage (in case Business Analytics, for example, uses non-PII 3 or 4 data only due to laws on personal data like GDPR).
The text was updated successfully, but these errors were encountered: