-
Notifications
You must be signed in to change notification settings - Fork 2
Authorization
Friedrich edited this page Jul 2, 2024
·
1 revision
Authorization for the access to resources inside a Solid pod can be done in two ways:
WAC uses an Access Control List (ACL), generally it has an .acl
extension, but this doesn't need to be so.
Example:
# Root ACL resource for the agent account
@prefix acl: <http://www.w3.org/ns/auth/acl#>.
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
# The homepage is readable by the public
<#public>
a acl:Authorization;
acl:agentClass foaf:Agent;
acl:accessTo <./>;
acl:mode acl:Read.
# The owner has full access to every resource in their pod.
# Other agents have no access rights,
# unless specifically authorized in other .acl resources.
<#owner>
a acl:Authorization;
acl:agent <http://localhost:3000/my-pod/profile/card#me>;
# Optional owner email, to be used for account recovery:
acl:agent <mailto:test@example.com>;
# Set the access to the root storage folder itself
acl:accessTo <./>;
# All resources will inherit this authorization, by default
acl:default <./>;
# The owner has all of the access modes allowed
acl:mode
acl:Read, acl:Write, acl:Control.
(source)
![](https://private-user-images.githubusercontent.com/2775701/345041110-b7247b23-6f4a-4ff2-98ce-12176fb47452.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyMjI2ODUsIm5iZiI6MTczOTIyMjM4NSwicGF0aCI6Ii8yNzc1NzAxLzM0NTA0MTExMC1iNzI0N2IyMy02ZjRhLTRmZjItOThjZS0xMjE3NmZiNDc0NTIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTBUMjExOTQ1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NGEwZTI0YzNjN2Q3NDlkMjcxMGViZTc4MTJkNTA3MzIzOThmODc4YmFkODViYjU1NTljYmEzMmFiODA3Yjk3ZCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.cfhJG5NKmcGxxJ_SJbXU-dCxfFFB9wiLaokNoO3_cJg)