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

Duplicated CEDAR Admin in docker install #11

Open
beepsoft opened this issue Dec 14, 2023 · 1 comment
Open

Duplicated CEDAR Admin in docker install #11

beepsoft opened this issue Dec 14, 2023 · 1 comment
Assignees

Comments

@beepsoft
Copy link
Contributor

After installing CEDAR 2.6.47 using docker and querying the users via https://resource.arp.orgx/users (arp.orgx is my CEDAR_HOST setting)I get the list of users below. What looks suspicious is that there are two CEDAR Admin users. One with ID https://metadatacenter.org/users/ab2a9696-291f-4705-b5e6-6c262266c506 and the other with https://metadatacenter.org/users/68d898fd-2b81-492c-b68c-a80c8283fd8a.

It seems that the one with ab2a9696-291f-4705-b5e6-6c262266c506 is created by cedar-infra-neo4j's neo4j-create-cedar-admin.cypher, while the one with 68d898fd-2b81-492c-b68c-a80c8283fd8a is the actual admin configured in cedar-infra-keycloak's keycloak-realm.CEDAR.development.2023-07-05.json and this is the one associated with the cedar-admin user. I wonder what the ab2a9696-291f-4705-b5e6-6c262266c506 admin user is for and can it cause it any problems?

{
  "users": [
    {
      "firstName": "caDSR",
      "lastName": "Admin",
      "email": "[email protected]",
      "@id": "https://metadatacenter.org/users/c31bab5a-4d2e-49f7-af0b-b149e7a350d4",
      "@context": {
        "schema": "http://schema.org/",
        "pav": "http://purl.org/pav/",
        "bibo": "http://purl.org/ontology/bibo/",
        "oslc": "http://open-services.net/ns/core#"
      },
      "lastUpdatedOnTS": 1702573858,
      "createdOnTS": 1702573857,
      "schema:name": "caDSR Admin",
      "resourceType": "user",
      "schema:identifier": null,
      "schema:description": null,
      "pav:createdOn": "2023-12-14T17:10:57Z",
      "pav:lastUpdatedOn": "2023-12-14T17:10:58Z",
      "sourceHash": null
    },
    {
      "firstName": "CEDAR",
      "lastName": "Admin",
      "email": "[email protected]",
      "@id": "https://metadatacenter.org/users/ab2a9696-291f-4705-b5e6-6c262266c506",
      "@context": {
        "schema": "http://schema.org/",
        "pav": "http://purl.org/pav/",
        "bibo": "http://purl.org/ontology/bibo/",
        "oslc": "http://open-services.net/ns/core#"
      },
      "lastUpdatedOnTS": 1598574585,
      "createdOnTS": 1598574581,
      "schema:name": "CEDAR Admin",
      "resourceType": "user",
      "schema:identifier": null,
      "schema:description": null,
      "pav:createdOn": "2020-08-28T00:29:41Z",
      "pav:lastUpdatedOn": "2020-08-28T00:29:45Z",
      "sourceHash": null
    },
    {
      "firstName": "CEDAR",
      "lastName": "Admin",
      "email": "[email protected]",
      "@id": "https://metadatacenter.org/users/68d898fd-2b81-492c-b68c-a80c8283fd8a",
      "@context": {
        "schema": "http://schema.org/",
        "pav": "http://purl.org/pav/",
        "bibo": "http://purl.org/ontology/bibo/",
        "oslc": "http://open-services.net/ns/core#"
      },
      "lastUpdatedOnTS": 1702573860,
      "createdOnTS": 1702573855,
      "schema:name": "CEDAR Admin",
      "resourceType": "user",
      "schema:identifier": null,
      "schema:description": null,
      "pav:createdOn": "2023-12-14T17:10:55Z",
      "pav:lastUpdatedOn": "2023-12-14T17:11:00Z",
      "sourceHash": null
    },
    {
      "firstName": "My",
      "lastName": "User",
      "email": "[email protected]",
      "@id": "https://metadatacenter.org/users/ac50f6c8-e2d2-47dd-86e3-38ee5841e28d",
      "@context": {
        "schema": "http://schema.org/",
        "pav": "http://purl.org/pav/",
        "bibo": "http://purl.org/ontology/bibo/",
        "oslc": "http://open-services.net/ns/core#"
      },
      "lastUpdatedOnTS": 1702573860,
      "createdOnTS": 1702573860,
      "schema:name": "My User",
      "resourceType": "user",
      "schema:identifier": null,
      "schema:description": null,
      "pav:createdOn": "2023-12-14T17:11:00Z",
      "pav:lastUpdatedOn": "2023-12-14T17:11:00Z",
      "sourceHash": null
    },
    {
      "firstName": "Test",
      "lastName": "User 1",
      "email": "[email protected]",
      "@id": "https://metadatacenter.org/users/0e97ec85-77a9-434c-8549-33f9eae22608",
      "@context": {
        "schema": "http://schema.org/",
        "pav": "http://purl.org/pav/",
        "bibo": "http://purl.org/ontology/bibo/",
        "oslc": "http://open-services.net/ns/core#"
      },
      "lastUpdatedOnTS": 1702573860,
      "createdOnTS": 1702573860,
      "schema:name": "Test User 1",
      "resourceType": "user",
      "schema:identifier": null,
      "schema:description": null,
      "pav:createdOn": "2023-12-14T17:11:00Z",
      "pav:lastUpdatedOn": "2023-12-14T17:11:00Z",
      "sourceHash": null
    },
    {
      "firstName": "Test",
      "lastName": "User 2",
      "email": "[email protected]",
      "@id": "https://metadatacenter.org/users/f41d7e08-6297-493d-9a60-787268075e33",
      "@context": {
        "schema": "http://schema.org/",
        "pav": "http://purl.org/pav/",
        "bibo": "http://purl.org/ontology/bibo/",
        "oslc": "http://open-services.net/ns/core#"
      },
      "lastUpdatedOnTS": 1702573860,
      "createdOnTS": 1702573860,
      "schema:name": "Test User 2",
      "resourceType": "user",
      "schema:identifier": null,
      "schema:description": null,
      "pav:createdOn": "2023-12-14T17:11:00Z",
      "pav:lastUpdatedOn": "2023-12-14T17:11:00Z",
      "sourceHash": null
    }
  ]
}
@beepsoft
Copy link
Contributor Author

beepsoft commented Jan 8, 2024

I think this is definitely a bug. The id here

and here (the UUID part)

_id:"https://metadatacenter.org/users/ab2a9696-291f-4705-b5e6-6c262266c506",

must match so that the setup of the admin user is correct. Otherwise the API key and the user (ID) won't be correctly associated with each other and so we cannot make API calls in the name of the admin user.

@egyedia egyedia self-assigned this Feb 15, 2024
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