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)) {