diff --git a/backend/src/federation/authenticateCommunities.ts b/backend/src/federation/authenticateCommunities.ts index 30831fc4a..88abc62f8 100644 --- a/backend/src/federation/authenticateCommunities.ts +++ b/backend/src/federation/authenticateCommunities.ts @@ -47,6 +47,13 @@ export async function startCommunityAuthentication( homeCom.publicKey.toString('hex'), args.url, ) + const pubKeyBuf = Buffer.from(args.publicKey, 'hex') + logger.debug(`Authentication: url=`, args.url) + logger.debug(`Authentication: homeCom.PublicKey=`, homeCom.publicKey) + logger.debug(`Authentication: pubKeyBuf=`, pubKeyBuf) + logger.debug(`Authentication: pubKeyBufString=`, pubKeyBuf.toString('hex')) + logger.debug(`Authentication: publicKey=`, args.publicKey) + if (await client.openConnection(args)) { logger.info(`Authentication: successful initiated at community:`, foreignFedCom.endPoint) } else { diff --git a/backend/src/federation/client/1_0/AuthenticationClient.ts b/backend/src/federation/client/1_0/AuthenticationClient.ts index bff61104e..96e7f8a20 100644 --- a/backend/src/federation/client/1_0/AuthenticationClient.ts +++ b/backend/src/federation/client/1_0/AuthenticationClient.ts @@ -26,11 +26,7 @@ export class AuthenticationClient { } async openConnection(args: OpenConnectionArgs): Promise { - logger.debug( - `Authentication: openConnection at ${this.endpoint} for args:`, - args.url, - args.publicKey, - ) + logger.debug(`Authentication: openConnection at ${this.endpoint} for args:`, args) try { // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment const { data } = await this.client.rawRequest(openConnection, { args }) diff --git a/federation/src/graphql/api/1_0/resolver/AuthenticationResolver.ts b/federation/src/graphql/api/1_0/resolver/AuthenticationResolver.ts index 77c093ae6..34ccf8222 100644 --- a/federation/src/graphql/api/1_0/resolver/AuthenticationResolver.ts +++ b/federation/src/graphql/api/1_0/resolver/AuthenticationResolver.ts @@ -19,13 +19,11 @@ export class AuthenticationResolver { args: OpenConnectionArgs, ): Promise { const pubKeyBuf = Buffer.from(args.publicKey, 'hex') - logger.debug( - `Authentication: openConnection() via apiVersion=1_0 ...`, - args, - args.url, - args.publicKey, - pubKeyBuf.toString('hex'), - ) + logger.debug(`Authentication: openConnection() via apiVersion=1_0:`, args) + logger.debug(`Authentication: url=`, args.url) + logger.debug(`Authentication: publicKey=`, args.publicKey) + logger.debug(`Authentication: pubKeyBuf=`, pubKeyBuf) + logger.debug(`Authentication: pubKeyBufString=`, pubKeyBuf.toString('hex')) // first find with args.publicKey the community, which starts openConnection request const requestedCom = await DbCommunity.findOneBy({