Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 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 Authenticator
from ..core.authing import SignedHeaderAuthenticator
from ..core.keeping import RemoteManager
from ..db import basing

Expand Down Expand Up @@ -197,15 +197,15 @@ def setupDoers(config: KERIAServerConfig):
bootApp.add_route("/health", HealthEnd())

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

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"]))
app.add_middleware(authing.AuthenticationMiddleware(agency=agency, authn=authn, allowed=["/agent"]))
app.req_options.media_handlers.update(media.Handlers())
app.resp_options.media_handlers.update(media.Handlers())

Expand Down
3 changes: 2 additions & 1 deletion src/keria/app/aiding.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,8 @@ def on_put(self, req, rep, caid):
ctrlHab = agent.hby.habByName(caid, ns="agent")
ctrlHab.rotate(serder=rot, sigers=[core.Siger(qb64=sig) for sig in sigs])

if not self.authn.verify(req):
# @TODO - foconnor: Not sure if this should be here - Signify is not signing headers for passcode rotation.
if not self.authn.inbound(req):
raise falcon.HTTPForbidden(description="invalid signature on request")

sxlt = body["sxlt"]
Expand Down
Loading
Loading