Skip to content
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

Unclear how to add an app #77

Open
michielbdejong opened this issue Mar 5, 2024 · 8 comments
Open

Unclear how to add an app #77

michielbdejong opened this issue Mar 5, 2024 · 8 comments

Comments

@michielbdejong
Copy link
Contributor

I'm running this repo as per the readme
I'm running https://github.com/jaxoncreed/ldo-react-tutorial-1 on port 3006
Now I want to add http://localhost:3006 as an app in http://localhost:4200/applications but it's asking me for the client ID.
I tried filling in http://localhost:3006 but that results in a 500 error when the GUI POSTs to http://localhost:4000/api. Request payload:

{id: "http://localhost:3006", type: "ApplicationProfileRequest"}
@michielbdejong
Copy link
Contributor Author

I think

is where it goes wrong. It can't find any application by that ID

@michielbdejong
Copy link
Contributor Author

If I look at the request that lists existing applications,
the request body is:

{
  "type": "[APPLICATION PROFILES] Application Profiles Requested"
}

and the response body is:

{
    "type": "[APPLICATION PROFILES] Application Profiles Received",
    "payload": [
        {
            "id": "http://localhost:5000/test-client",
            "name": "Demo Client",
            "logo": "https://robohash.org/https://demo-client.example/?set=set3",
            "authorizationDate": "2020-04-04T21:11:33.000Z",
            "accessNeedGroup": "http://localhost:5000/test-client/access-needs"
        },
        {
            "id": "http://localhost:3000/acme/projectron/vue",
            "name": "Vuejectron",
            "logo": "https://robohash.org/https://vuejectron.example/?set=set3",
            "authorizationDate": "2024-02-23T15:34:26.395Z",
            "lastUpdateDate": "2024-02-23T15:34:26.395Z",
            "accessNeedGroup": "http://localhost:3000/acme/projectron/access-needs#need-group-pm",
            "callbackEndpoint": "http://localhost:4500"
        }
    ]
}

Maybe I can just find where this data comes from (file? CSS? Redis?) and then add my app there manually.

@michielbdejong
Copy link
Contributor Author

michielbdejong commented Mar 5, 2024

Ah I see untracked files in Alice's agentRegistry and authorizationRegistry in the css-storage-fixture package on my machine:

	packages/css-storage-fixture/alice/agentRegistry/974f159d-39c3-45d4-9e31-5b904cfe89b3/
	packages/css-storage-fixture/alice/agentRegistry/bob/66332431-5a66-497a-a1bb-603e403c50e3$.ttl
	packages/css-storage-fixture/alice/agentRegistry/bob/e7f573d8-2828-4273-a344-94a214482264$.ttl
	packages/css-storage-fixture/alice/agentRegistry/bob/fded17e5-44f7-47d5-9f79-da1b13efe30c$.ttl
	packages/css-storage-fixture/alice/agentRegistry/kim/9c1b8c6b-fcc8-46c2-b841-b625f1dc0e55$.ttl
	packages/css-storage-fixture/alice/agentRegistry/kim/b2f8e39e-d0a8-4b0f-bdcc-ecc43da502f3$.ttl
	packages/css-storage-fixture/alice/agentRegistry/kim/c05355ed-9d96-4c70-8840-14a96009f98f$.ttl
	packages/css-storage-fixture/alice/agentRegistry/kim/e1c0c755-aeb9-41f8-89c9-80f8c33ea710$.ttl
	packages/css-storage-fixture/alice/agentRegistry/kim/f7c7770c-c483-4fad-9ff4-0c2edf083261$.ttl
	packages/css-storage-fixture/alice/authorizationRegistry/10b09a84-1c9e-4d38-988f-d48f99bc19f5$.ttl
	packages/css-storage-fixture/alice/authorizationRegistry/16d5d2b7-671a-43d0-a17d-05ff4e8d8ad8$.ttl
	packages/css-storage-fixture/alice/authorizationRegistry/81fa4215-5599-4a39-9e0e-af1a79d8e1ca$.ttl
	packages/css-storage-fixture/alice/authorizationRegistry/9238caa9-9c78-4fe9-bcba-e13ed0455767$.ttl
	packages/css-storage-fixture/alice/authorizationRegistry/af70532e-ad76-421b-a733-f2ccee571a39$.ttl
	packages/css-storage-fixture/alice/authorizationRegistry/cd14e0a6-f067-4e5e-bca9-1179bf4d0d2d$.ttl
	packages/css-storage-fixture/alice/authorizationRegistry/df0d7843-5a62-4dd6-96d2-12354ad62471$.ttl
	packages/css-storage-fixture/alice/authorizationRegistry/f4ddf84d-28b4-4318-a4c5-46aa5cdf0240$.ttl

Will see what happens when I reset the repo, so I can track how http://localhost:3000/acme/projectron/vue and http://localhost:5000/test-client get registered.

@michielbdejong
Copy link
Contributor Author

Ah! After the reset I only see the demo client and that comes from https://github.com/janeirodigital/sai-js/blob/main/packages/css-storage-fixture/alice/agentRegistry/test-client/.meta - will try to copy that for my own app!

@michielbdejong
Copy link
Contributor Author

Yes! I was able to add my app by editing the fixture. Would still be nice to do it through the GUI but at least this gives us a way in: https://github.com/michielbdejong/sai-js/tree/investigating-77

@michielbdejong
Copy link
Contributor Author

OK now I think the next step is jaxoncreed/ldo-react-tutorial-1#3

@michielbdejong
Copy link
Contributor Author

I got as far as jaxoncreed/ldo-react-tutorial-1#4 - this should add the data need to this app so that I think in theory it should become consumable by SAI, although I haven't seen it working yet.

@elf-pavlik can you help? Any advice?

@elf-pavlik
Copy link
Collaborator

To authorize an app, it needs client_id which resolves to Client ID document, per https://solidproject.org/TR/oidc#clientids-document

You can find the one used by the vujectron here https://github.com/janeirodigital/sai-js/blob/main/packages/css-storage-fixture/acme/projectron/vue%24.jsonld

Please note that besides all the Solid-OIDC related information it has to SAI specific properties, as explained in https://solid.github.io/data-interoperability-panel/specification/#app

SAI spec still needs to de-duplicate some of the properties listed with ones provided by oidc solid/data-interoperability-panel#210
As you seen in vujectron's client id document, there are only two properties from SAI required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants