Support multiple IDs in grants (#3263)

This allows specifying multiple IDs in grants via an `ids` field, which
will eventually become the normal way to specify IDs. Internally, each
grant with multiple IDs turns into multiple ACL grants each with a
single ID; to make this distinction clearer and allow for better
separation of concerns an AclGrant type has been introduced, so really
multiple IDs in a Grant turn into multiple AclGrants.

The nice thing about doing it this way is that it becomes purely a
parsing concern; no actual validation logic has changed.

For backwards compatibility with grants already stored in roles, we do
not error out if `id` is specified. However, eventually we will simply
not support grants with `id` coming via the API; they will fail API
validation, such that new grants will require the use of the updated
`ids` field.

A follow-on PR will plumb this through the service handlers/API/CLI, but
I decided to do it in separate chunks to make reviewing easier, given
that they are easily separable into the internal and external aspects of
the change.

* Add CLI/API checks around using ID in grants (#3264)

* Plumb through some contexts to remove a lot of deprecated errors (#3268)
This commit is contained in:
Jeff Mitchell committed 2023-06-14 21:55:24 -04:00
1 parent 8acc73dc6e
commit feb3aea38f
25 files changed
+1043 -381

No files matched your search

+9 -1
View File
@@ -5248,7 +5248,15 @@
"properties": {
"id": {
"type": "string",
"description": "Output only. The ID, if set.",
"description": "Output only. The ID, if set.\nDeprecated: use \"ids\" instead.",
"readOnly": true
},
"ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Output only. The IDs, if set.",
"readOnly": true
},
"type": {