How people can access data from pods?

Hello Everyone,
I am new to solid project and want to know that how can different peoples can access secure stored data from pods. If anyone have any info about it then kindly share it with me.
Thank you very much.
Regards: Michel John.

In Solid Pods we have access rights similar to the linux-rights-management. Technically it works with Access Control Lists (.acl-files). I’ll append two things cause I don’t know the concrete direction of your question (an user, an owner, just using the browser, Pod A accessing Pod B, code for developping an App accessing e.g. public or private files, etc.)

  1. Rights for a public folder (Owner, Everyone, etc.)
  2. A snippet for accessing a private simple textfile using Solid’s Login-methods and display this file in the console with the help of a little Javascript.
    (3. As Owner of the Pod you always have all rights.)

hope that helps, get back any time with a precision or concretization. I’m not a pro but this is to my best knowledge.

<!doctype html>
<html lang="en">
<!-- login and read private file (test) location https://testpro.solidweb.org/public/ctest/login2/test.html -->
<head>
  <meta charset="utf-8">
<!-- IMPORT SOLID-AUTH-CLIENT AND SOLID-FILE-CLIENT LIBRARIES
-->
<script src="https://cdn.jsdelivr.net/npm/solid-auth-client@2.3.0/dist-lib/solid-auth-client.bundle.js"></script>
<script src="https://cdn.jsdelivr.net/npm/solid-file-client@1.0.0/dist/window/solid-file-client.bundle.js"></script>

<script>
// INSTANTIATE AUTH AND FILE-CLIENT OBJECTS
//
    const auth = solid.auth
    const fc   = new SolidFileClient(auth)
    const someUrl = 'https://testpro.solidweb.org/private/2test/pread.txt'

// DEFINE A URI THAT CONTAINS A POPUP LOGIN SCREEN
//
    const popUri = 'https://solidweb.org/common/popup.html'

// USE THE AUTH OBJECT TO LOGIN AND CHECK THE SESSION
// USE THE FILE-CLIENT OBJECT TO READ AND WRITE
//
    async function run(){
    	console.log ("function called, wait login")
        let session = await auth.currentSession()
        if (!session) { session = await auth.popupLogin({ popupUri:popUri }) }
        console.log(`Logged in as ${session.webId}.`)
        let content = await fc.readFile( someUrl )
        console.log(content)
    }
	console.log ("start of code")
    run()
</script>
</head>
<body>
<div class="container">
  <div class="page-header">
    <div class="pull-right">
      <button id="register" type="button" class="btn btn-primary">Register</button>
      <button id="login"    type="button" class="hidden btn btn-default btn-success">Log in</button>
      <button id="logout"   type="button" class="hidden btn btn-danger">Log out</button>
    </div>
<h5><a href = "https://github.com/solid">solid</a> private read experiment </h5>
<p>all output goes to the console</p>
<script src="https://solidweb.org/common/js/auth-buttons.js"></script>
</body>
</html>

1 Like

To compliment the good previous explanation, as with many question related to how certain elements of Solid work, I’d also recommend taking a look at the Solid Specification (Solid Protocol), specifically the section on Authorization and Web Access Controls (WAC) (Web Access Control) that is used for authorization by NSS. With WAC, Access Control Lists (ACL) files can be associated with each Resource in a Pod which contain information on who can access the Resource. ACL files can be manipulated via Data Browser (userguide/userguide.md at main · solid/userguide · GitHub) and PodBrowser (https://podbrowser.inrupt.com).

ESS (as well as implementing WAC to be spec compliant) also implements Access Control Policies (ACP) (authorization-panel/index.md at main · solid/authorization-panel · GitHub) as an alternative method of authorization. ACP controls access to Resources via rules and policies. ACPs can be manipulated via PodBrowser (https://podbrowser.inrupt.com).

From a developer perspective, the JS Client Libraries Universal API (Module: access/universal — Inrupt solid-client API Documentation) provides a common way of accessing authorization information.

Hope that helps.

Kevin

1 Like