-
Notifications
You must be signed in to change notification settings - Fork 36
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
Question about Integrating External Authorization in Signify-TS API for KERIA Agent Access #309
Comments
Hi @t-kanuma Signify-ts and KERIA use signed headers for all operations between the controller and agent, making a token unnecessary. Token based systems are less secure as they provide additional attack vectors. signify-ts/src/keri/app/clienting.ts Line 169 in 1e451d1
|
SignifyTS and KERIA use a signed everything architecture, so every request is signed. This is the foundation of a zero trust architecture. Zero trust means do not blindly trust anything like an authorization token. Instead you always verify. What are you verifying? The signature on each message, which in this case is a request. Bearer token architectures like OAuth, JWT, OpenID Connect, and similar are antithetical in security posture as compared to KERI. So it would defeat the entire purpose of using KERI (SignifyTS and KERIA) if you were to use the comparatively low security approach of authorization tokens. All requests between SignifyTS and KERIA are already validated and access authorization is checked via HTTP message signature by KERIA on each request. So no additional checking between those two components is necessary. If the message signature verifies for KERIA then it can only have come from the correct Signify client. Yet, to fully answer your external information question there is no current way to add in another HTTP header to the HTTP messages between SignifyTS and KERIA. That could be exposed in Signify though such has not been done yet. It seems you are asking about communication between SignifyTS and KERIA, which as I said, is already highly secure and properly validated. If, instead, you are wondering how to integrate the zero trust architecture of Signify and KERIA into your target architecture then you need at least two things, a CESR parser and a persistent memory of key event logs (KELs) for key histories and transaction event logs (TELs) for credential states. To accomplish a similar goal of role based authorization with KERI and ACDC you have a few options:
This is a long answer to your question of authorization and validation. To match the existing workflow of validating a JWT at and edge of your architecture in something like a reverse proxy I would go with the first option of the role cache and signature verification as this is the least work. It is also the least protection. The next best option is to perform full KEL and TEL validation yet you need a full CESR parser and set of cryptographic primitives to perform that validation. Signify TS is three to five weeks away of serious effort from having a full CESR parser. It already has most of the cryptographic primitives. Does this answer your question? |
I made a small mistake in my response I just fixed. There should have been a "do not" in front of "blindly trust" |
Thank you for your response. First, I believe I have at least some understanding of the philosophical differences between KERI and existing identity systems like OIDC/OID4VC. Also, I apologize for not providing enough background for my question. The scenario I have in mind is as follows: Suppose a company A sets up a KERIA Agent within its system infrastructure. If no additional measures are taken, I assume that anyone who gains access to that environment could interact with the KERIA Agent. In other words, new unique AIDs/KELs could be created arbitrarily. From a security perspective, I believe it would be better to prevent this, which is why I asked the question. I would appreciate your thoughts on this issue, as well as any potential countermeasures. (A slightly unrelated point, but for comparison: In Hyperledger Aries, which implements DIDComm, the Web Agent provides a REST API, allowing access from an application backend, making access control manageable. On the other hand, in implementations like DWN (Web5), where the frontend application directly accesses the backend Agent/Node—similar to Signify-ts and KERIA—I had the same concern.) Additionally, I have a follow-up question. You mentioned that access from Signify-ts to KERIA is secure, but does this also include the aspect of encrypted communication? My understanding was that communication between Agents is encrypted, even over HTTP, due to key exchange via OOBI. However, in the case of communication between Signify-ts and KERIA, I assumed it might not be the same and that a reverse proxy such as Nginx might be needed to enforce HTTPS. |
This is incorrect. KERIA uses the Signify protocol, which means all keys for a Signify-style identifier are at the edge, in memory, which means all event signing by that identifier happens at the edge. The Agent is used only to relay messages, not to sign on behalf of the Signify identifier.
If things were like you suggested then yes, it would be better to prevent this. The security architecture of Signify and KERIA already prevent this by design.
Not yet, though the ESSR work underway will add this.
No, this is not the case. Once ESSR lands then we can support encrypted communications. |
@t-kanuma are you saying that Aries with the Web Agent provides unrestricted access to the agent if you have access to the same physical host? I am as of yet unfamiliar with the Aries architecture, and I also know next to nothing about the DWN node architecture. I would hope that those decentralized identity architectures rely on edge keys for signing requests for authentication and authorization rather than providing open access through a REST API. KERIA and Signify do not provide such open access. A KERIA Agent is merely a communication proxy, like a mailbox (store and forward agent) that is used to coordinate communications. The agent is not issued any credentials or used in any way other than as a persistent online presence that the edge Signify key can send signed messages to and receive messages from the KERIA agent. |
This is very helpful information. Thank you so much. |
To be clear, the KERI, ACDC, CESR, and TSP protocol stacks already support ESSR and there are already community members using ESSR for confidentiality. What I was referring to is that full ESSR support for communications between SignifyTS and KERIA has not yet been completed and is partially underway. |
In Aries, Cloud Agents are provided for organizational roles such as Issuers and Verifiers. (I previously referred to them as Web Agents, but that was not the best expression.) These Cloud Agents handle processes such as signing and verification according to the Aries Protocol on the backend. The backend of a web application calls the APIs exposed by these agents. Authentication for these API calls can be managed using options such as API keys. Additionally, Cloud Agents support multi-tenancy. Aries also has Edge Agents designed for individuals to use as Holders in applications on mobile devices. These Edge Agents handle all processing on the front end and store data locally. Since they do not have a global IP (endpoint), a Mediator is deployed on the backend. The Mediator, similar to email relays, is shared among multiple Holders to route peer-to-peer messages. DWN (Decentralized Web Node) is similar to Aries' Edge Agent in that it operates applications on the front end to handle signing, verification, and business logic. In DWN, data is stored on the front end, but a copy is also synchronized with backend nodes. This setup allows other entities to retrieve or send data to a specific individual by querying an endpoint. Additionally, DWN backend nodes are multi-tenant, meaning a single host can support multiple front-end entities. |
I understand the concepts of KATE and End Verifiable, and my question was based on that premise. However, I realize that the quality of my question was not optimal, and I was not able to convey my intention effectively. That said, through the process of asking the question, I was able to clarify some points for myself. Therefore, I would like to close this question. Thank you for your help. |
This is fascinating. This means that Aries agents use bearer tokens to authenticate to their agents. I did not know that. KERI and ACDC were designed to avoid using things like bearer tokens. An API key is a kind of bearer token. Bearer tokens are vulnerable to a number of attacks that KERI is not vulnerable to at all because KERI uses a no-shared secrets architecture. |
I want to place a reverse proxy to validate requests and verify access authorization when accessing the KERIA agent. Does signify-ts API provide any ways to include external information (such as an authorization token) in the request, for example, by adding it to the headers?
The text was updated successfully, but these errors were encountered: