Skip to content
18 changes: 10 additions & 8 deletions src/keria/app/agenting.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
from ..peer import exchanging as keriaexchanging
from .specing import AgentSpecResource
from ..core import authing, longrunning, httping
from ..core.authing import Authenticater
from ..core.authing import Authenticator
from ..core.keeping import RemoteManager
from ..db import basing

Expand Down Expand Up @@ -152,8 +152,8 @@ def setupDoers(config: KERIAServerConfig):
"""
Sets up the HIO coroutines the KERIA agent server is composed of including three HTTP servers for a KERIA agent server:
1. Boot server for bootstrapping agents. Signify calls this with a signed inception event.
2. Admin server for administrative tasks like creating agents.
3. HTTP server for all other agent operations.
2. Admin server for any Signify client related actions after bootstrapping.
3. HTTP server for all other external agents send KERI events or messages for interactions.
"""
agency = Agency(
name=config.name,
Expand All @@ -173,7 +173,8 @@ def setupDoers(config: KERIAServerConfig):
'signature',
'signature-input',
'signify-resource',
'signify-timestamp'
'signify-timestamp',
'signify-receiver'
]
bootApp = falcon.App(middleware=falcon.CORSMiddleware(
allow_origins='*', allow_credentials='*',
Expand All @@ -188,11 +189,12 @@ def setupDoers(config: KERIAServerConfig):
bootApp.add_route("/health", HealthEnd())

# Create Authenticater for verifying signatures on all requests
authn = Authenticater(agency=agency)
authn = Authenticator(agency=agency)

app = falcon.App(middleware=falcon.CORSMiddleware(
allow_origins='*', allow_credentials='*',
expose_headers=allowed_cors_headers))
app = falcon.App(
middleware=falcon.CORSMiddleware(allow_origins='*', allow_credentials='*', expose_headers=allowed_cors_headers),
request_type=authing.ModifiableRequest
)
if config.cors:
app.add_middleware(middleware=httping.HandleCORS())
app.add_middleware(authing.SignatureValidationComponent(agency=agency, authn=authn, allowed=["/agent"]))
Expand Down
4 changes: 2 additions & 2 deletions src/keria/app/aiding.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@


def loadEnds(app, agency, authn):
groupEnd = AgentResourceEnd(agency=agency, authn=authn)
app.add_route("/agent/{caid}", groupEnd)
agentEnd = AgentResourceEnd(agency=agency, authn=authn)
app.add_route("/agent/{caid}", agentEnd)

aidsEnd = IdentifierCollectionEnd()
app.add_route("/identifiers", aidsEnd)
Expand Down
Loading