Hi All! Going to try a batch response here, please feel free to follow up as needed.
To note upfront - there is a key point in the changelog that was not communicated clearly, apologies.
This is that this change only applies to content that has view restrictions applied. This was noted at the end of the first section, but should have been noted throughout.
I’ve updated CHANGE-3496 in the following spots for clarity:
-
After this change → After this change, for content with view restrictions
-
any API request to remove only the read restriction → any API request to remove only the read restriction (but not all read restrictions)
-
review your implementation to ensure: → review your implementation to ensure that content with view restrictions
Also, will note the below for clarity here on CDAC (again, only for view restricted content):
-
For any principal that only held update previously, they will now automatically hold update & read
-
For any restriction “additions” ie requests that add only update for a principal, read will now be added automatically as well
-
The added rejection only applies on the “removal” side, and is intended to make it clearer to the caller that requests that previously put a principal in this “invalid” configuration (update without read) are now being ignored instead of accepted
Examples of operations that will continue to succeed, for view restricted content:
Examples of operations that will receive a 400, for view restricted content:
- V1 DELETE/PUT that removes view for a principal that also holds update, and this view restriction is not the last remaining restriction
Generally in chronological order:
Can you add examples to the documentation of what shape the payload is when you add/remove permissions and restrictions to the documentation? I did not understand the payload shape in all cases.
I fully agree that the existing/V1 docs could use some tightening. I’ll get rolling on this. Please let me know if this is all you had in mind, or if there are shapes from the newly introduced V2 API docs that are unclear.
Can Atlassian please deprecate the v1 endpoints after the Forge deprecation? We’re busy migrating to Forge, and having this deprecation at the same time would imply we need to change the Forge and the Connect code base while migrating.
I’ll need to get back to you on this. So far - we have not announced the firm deprecation for V1 endpoints, but I will make sure this is taken into consideration when it is made.
Is there interaction of these permissions/restrictions with the Confluence roles? I’m unsure how these interact.
There is no overlap between space roles & these changes. Confluence Space roles are related to the Space permission layer, these changes are related to the Content permission layer.
This document has an overview of the different layers: Confluence permissions structure.
However - space roles & content perms are both taken into account when determining a principal’s access to a piece of content, for example.
I note that the new V.2 API group seems to be missing endpoints for the slides and smartlinks contentTypes.
Appreciate the callout. I am discussing with our teams the plan around V2 API support for Slides. I agree that we need to have equivalent support for the Slides content type before we start the deprecation period for the V1 APIs.
Smartlinks does not support content permissions (ref).
Please let me know if you see any angles I might be missing!
Can you confirm that this is the only set of APIs that you will be deprecating, and not other V.1 permissions-related APIs (such as https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-permissions/#api-wiki-rest-api-content-id-permission-check-post)?
Confirmed.
Does the deprecation also cover the restrictions.* expansions on /wiki/rest/api/content/search
It does not. I’m discussing the plan for expansions with my team.
Note - even though there are no changes currently planned, this does mean that the expansions are still on the legacy model - where “redundant” permissions are invisible. Happy to expand on that if it doesn’t make sense.
Is a bulk read of restriction state and permissions planned (a CQL expansion or a batch endpoint)?
Currently, this is not planned.
What do the v1 restriction GETs and the restrictions expansion return for states v1 can’t model?
They will not return these entries.
“Can edit” entries in a non-”Open” state, or “Can view” entries in an “Edit restricted” state are only model-able & return in the V2 model.
Does a read or update entry have any effect on OPEN content?
No - any permissions on an “OPEN” content are redundant when it comes to “effective” access.
Can a content-level “Can edit” let someone edit whose space role only allows viewing?
No - in order to edit content in a space, holding the necessary access at the Space level is still required.
Is EDIT_RESTRICTED or VIEW_RESTRICTED with zero update entries a valid state, and who can edit then?
It is possible to end up in this state due to:
-
All principals who had access being deleted
-
Leveraging allow-self-lockout param
-
A few other historical paths..
In order to move the content out of this state, generally one of the below can be used:
-
Space Admin just using share dialog to change to OPEN state (in case of edit restricted)
-
Org Admins on Premium+ → Admin Key to share dialog (in the case of view restricted)
-
Space Admins → Restricted UX (wiki/pages/listpermissionpages.action?key=)
- Note - currently limited to page type
-
Space Admins → Using V2 Set restriction state API
Does deleting the last update entry change the state?
It depends.
If interacting through the old model (V1) - then generally, yes. For example - removing all update entries should move a content from EDIT_RESTRICTED to OPEN.
If interacting through the new model (V2) - then no, they are decoupled.
Hopefully the visual/comparison table gives a good overview of the comparison, but please let me know if I can provide more examples/explanations. I realize that it might not be very intuitive at first.
Does PUT …/restriction-state with EDIT_RESTRICTED require existing update entries, or does it add the caller?
It generally requires existing update entries, and does not add the caller. This can be overridden with allow-self-lockout.
After PUT … OPEN, are the entries kept, and do they become effective again on the next EDIT_RESTRICTED?
Yes to both. This is because in the V2/updated model, the these are decoupled.
Does “the calling user’s own edit access” take group membership and space admin permission into account?
The user’s group membership is taken into account, but not Space Admin permissions. The Space Admin’s ability to manage content restrictions should be thought of as an ability to override if needed (think Restricted UI at wiki/pages/listpermissionpages.action?key=spacekey).
In Forge, is the impersonated user of api.asUser(accountId) the calling user? Does the check apply to asApp()?
Put simply, asUser uses the users permissions. asApp uses the apps permissions.
Which error code do we get when a request is rejected because of a lockout?
The docs say “Permission to edit the page or administer the space”. Is the space permission to restrict content still enforced on top of that?
Yes - good callout. At this granularity - the docs are noting the “Admin” role, which contain both “Manage all content in space” & “Manage access to individual content” space permissions.
If you are in RBAC transition mode, only “Manage access to individual content” is required.
There are some more notes here: What are Confluence’s roles?, specifically under the Manage all content in space permission.
Is there a read-only way to check whether user X may change the permissions of content Y? For example, does GET /pages/{id}/operations report something like restrict_content? Today we have to probe with a write.
The operations endpoint should return restrict_content. Though note - this endpoint does return 404 when the content is view restricted from the caller.
404 now means both “not found” and “no permission”. Could you document the stable code values for: no permission, self-lockout rejected, the 500-entry limit exceeded, invalid principal, invalid state transition?
I’ll get the V2 API doc updated shortly! In the meantime - generally all the cases you noted (self-lockout rejected, 500-entry limit exceeded, invalid principal, invalid state) will return 400.
“Events” questions
There are no changes to events yet. Events will continue to fire on “effective only” changes to permissions.
Example:
Simon, is there a way for a vendor to tell which tenants already have the new behaviour?
Double checked here, there is no API or else exposed that could tell you that the change has hit a tenant, the only route would be simply observing the change in the API behavior.
for us it is very important to understand whether we can add an stand-alone update permission for user who can “only” view via a group permission.
You will still be able to add an update restriction for a user who can only view via a group permission. However - note the request will add both the update & read restriction for this user.
As I read CHANGE-3496, an update restriction now has to come with a matching read restriction, so the open point is whether view access granted through a group counts as that read restriction. Simon, could you confirm how that case is handled?
&
If I understand the change our production customers will start seeing immediately failures on all calls that attempt to grant the update privilege by itself?
If you are changing the v1 API behavior, why doesn’t the API add an (implied) Read when you receive an request for Update operation? That could maintain the new explicit permissions requirement of Read & Update.
(batching these together since same idea)
Apologies for the unclear wording. Hopefully the blurb at the top of this reply helps.
To clarify here as well - a request to add an update restriction for a view restricted content should be sent with a matching read restriction, but if it is not, a read restriction will automatically be granted.
It is like how you noted in last part of the message above.
What happens if an app first reads the restrictions, and then modifies them for some principals for update. In our current instance, no read restrictions are returned for these principals, only update restrictions.
&
If some content has no read restrictions, and I want to just give update restrictions to an accountId, it seems I now have to also add read restrictions. However I want no read restrictions, and just that only select accountIds can update. How can this work if we must add read restrictions in order to get update restrictions? Read restrictions would imply that only select accountIds can read the content.
Similar to previous responses - apologies for the unclear wording. These changes only apply to “view restricted” content, so they would not apply for content where there are no read restrictions for the content (“edit restricted”).
Principals who previously only held update on view restricted content will now automatically get read.
Does the deprecation cover the restrictions.* expansions on
/wiki/rest/api/content/search, or only the dedicated v1 restriction
endpoints? @andreas1 asked this as well and honestly it’s the whole
question for us - inconvenience or rewrite.
Is a bulk read planned for v2 at all? CQL expansion, batch endpoint,
include parameter on the list endpoints, anything.
If it isn’t planned, what would you suggest for an audit app that needs
restrictions across a whole site inside the asUser budget? Genuinely
asking - we may be approaching this wrong.
These expansions are currently not in scope. I’ll talk to my team about bulk calls.
Ok - hopefully this reply helps respond to the first round of questions, totally understand if there are more. Happy to provide more examples for any questions. Appreciate everyone’s feedback on this topic. And please feel free to let me know if missed anything.