From d991606d939445ca1ca6eceb49b2ecee10de425a Mon Sep 17 00:00:00 2001
From: clauspeterhuebner
Date: Fri, 11 Jul 2025 17:54:07 +0200
Subject: [PATCH] remove detailed logs and use correct publickey for
openConnectionCallback
---
.../src/graphql/api/1_0/resolver/AuthenticationResolver.ts | 4 ----
federation/src/graphql/api/1_0/util/authenticateCommunity.ts | 2 +-
2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/federation/src/graphql/api/1_0/resolver/AuthenticationResolver.ts b/federation/src/graphql/api/1_0/resolver/AuthenticationResolver.ts
index 0ba556584..d67a74d6e 100644
--- a/federation/src/graphql/api/1_0/resolver/AuthenticationResolver.ts
+++ b/federation/src/graphql/api/1_0/resolver/AuthenticationResolver.ts
@@ -43,10 +43,6 @@ export class AuthenticationResolver {
logger.removeContext('handshakeID')
throw new Error(errmsg)
}
- const pubKeyComA = Buffer.from(args.publicKey, 'hex')
- logger.debug('pubKeyComA', pubKeyComA)
- logger.debug('args.publicKey', args.publicKey)
- // const requestingCom = await DbCommunity.findOneBy({ publicKey: Buffer.from(args.publicKey, 'hex') })
const fedComA = await DbFedCommunity.findOneBy({ publicKey: Buffer.from(args.publicKey, 'hex') })
logger.debug('fedComA', new FederatedCommunityLoggingView(fedComA!))
if (fedComA && !openConnectionJwtPayload.url.startsWith(fedComA.endPoint)) {
diff --git a/federation/src/graphql/api/1_0/util/authenticateCommunity.ts b/federation/src/graphql/api/1_0/util/authenticateCommunity.ts
index c1e419465..264d6fd1a 100644
--- a/federation/src/graphql/api/1_0/util/authenticateCommunity.ts
+++ b/federation/src/graphql/api/1_0/util/authenticateCommunity.ts
@@ -60,7 +60,7 @@ export async function startOpenConnectionCallback(
// encrypt callbackArgs with requestedCom.publicJwtKey and sign it with homeCom.privateJwtKey
const jwt = await encryptAndSign(callbackArgs, homeComB!.privateJwtKey!, comA.publicJwtKey!)
const args = new EncryptedTransferArgs()
- args.publicKey = comA.publicKey.toString('hex')
+ args.publicKey = homeComB!.publicKey.toString('hex')
args.jwt = jwt
args.handshakeID = handshakeID
if (await client.openConnectionCallback(args)) {