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

Missing Documentation for API_KEY_ENABLED Configuration in Identus Cloud Agent #1484

Open
Neethu-Muthu opened this issue Dec 18, 2024 · 2 comments
Assignees

Comments

@Neethu-Muthu
Copy link

Is this a regression?

No

Description

When using the Identus Cloud Agent, I encountered the following error while trying to interact with the Cloud Agent API:
{
"status": 403,
"type": "authentication_error",
"title": "",
"detail": "ApiKey key is not provided",
"instance": "error:instance:9912cec4-df07-4b62-ba7c-2ffd6b9609cf"
}
The issue occurs because the API_KEY_ENABLED environment variable is set to true by default in the Docker Compose configuration. This critical detail is not mentioned in the repository’s README.md file or related documentation, leaving users unaware of how to disable this feature if not needed.

To resolve this issue, I propose updating the README.md file to include a Troubleshooting section. This section should explain how to locate and modify the API_KEY_ENABLED variable in the docker-compose.yml file and restart the services.

Please provide the exception or error you saw

curl --location \
--request POST 'http://localhost:8000/cloud-agent/did-registrar/dids' \
--header 'Accept: application/json' \
--data-raw '{
    "documentTemplate": {
        "publicKeys": [
        {
          "id": "auth-1",
          "purpose": "authentication"
        },
        {
          "id": "issue-1",
              "purpose": "assertionMethod"
        }
      ],
      "services": []
    }
}'
{"status":403,"type":"authentication_error","title":"","detail":"ApiKey key is not provided","instance":"error:instance:9912cec4-df07-4b62-ba7c-2ffd6b9609cf"}

Please provide the environment you discovered this bug in

Operating System: Ubuntu 22.04.3 LTS
Docker Version: version 27.0.3, build 7d4bcd8
Docker Compose Version: docker-compose version 1.28.5, build c4eb3a1f
Identus Cloud Agent Version: 1.36.1

Anything else?

To help other users troubleshoot similar issues, I recommend including the following instructions in the README.md file:

Locate the Docker Compose File:
Navigate to infrastructure/shared/docker-compose.

Modify the Environment Variable:
Change API_KEY_ENABLED=true to API_KEY_ENABLED=false in the docker-compose files to disable the API key authentication mechanism.

Restart Services and Verify Changes:
Re-run your API commands to confirm the error is resolved.

@yshyn-iohk yshyn-iohk self-assigned this Jan 13, 2025
@yshyn-iohk
Copy link
Member

Thanks for reporting the issue, @Neethu-Muthu.

We are trying to simplify the provisioning of the Identus platform and publish another docker-compose file with the appropriate documentation. You can find it here

At the same time, you can use the cloud-agent and mediator images and your docker-compose file that fits your purpose.

The documentation for disabling the API key authentication exists in the documentation portal. You can find other options to configure the authentication logic in the cloud agent.

I will update the README.md to point to the correct location with the docker-compose files.

@yshyn-iohk
Copy link
Member

The full list of the environment variables of the cloud-agent is available in the documentation portal

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