private ByteBuf decryptPayloadIfNeeded(MessageIdData messageId, MessageMetadata msgMetadata, ByteBuf payload, ClientCnx currentCnx) { if (msgMetadata.getEncryptionKeysCount() == 0) { return payload.retain();
if (msgMetadata.getEncryptionKeysCount() > 0) { encryptionCtx = new EncryptionContext(); Map<String, EncryptionKey> keys = msgMetadata.getEncryptionKeysList().stream()
if (msgMetadata.getEncryptionKeysCount() > 0) { throw new IOException("Cannot parse encrypted message " + msgMetadata + " on topic " + topicName);
if (msgMetadata.getEncryptionKeysCount() > 0) { throw new IOException("Cannot parse encrypted message " + msgMetadata + " on topic " + topicName);
private ByteBuf decryptPayloadIfNeeded(MessageIdData messageId, MessageMetadata msgMetadata, ByteBuf payload, ClientCnx currentCnx) { if (msgMetadata.getEncryptionKeysCount() == 0) { return payload.retain();
if (msgMetadata.getEncryptionKeysCount() < 1) { log.warn("[{}] Messages must be encrypted", getTopic().getName()); cnx.ctx().channel().eventLoop().execute(() -> {
if (msgMetadata.getEncryptionKeysCount() > 0) { encryptionCtx = new EncryptionContext(); Map<String, EncryptionKey> keys = msgMetadata.getEncryptionKeysList().stream()
for (int i = 0; i < getEncryptionKeysCount(); i++) { if (!getEncryptionKeys(i).isInitialized()) { memoizedIsInitialized = 0;
public static boolean isReadableBatch(RawMessage msg) { ByteBuf payload = msg.getHeadersAndPayload(); MessageMetadata metadata = Commands.parseMessageMetadata(payload); try { return metadata.hasNumMessagesInBatch() && metadata.getEncryptionKeysCount() == 0; } finally { metadata.recycle(); } }
private boolean isMessageUndecryptable(MessageMetadata msgMetadata) { return (msgMetadata.getEncryptionKeysCount() > 0 && conf.getCryptoKeyReader() == null && conf.getCryptoFailureAction() == ConsumerCryptoFailureAction.CONSUME); }
for (int i = 0; i < getEncryptionKeysCount(); i++) { if (!getEncryptionKeys(i).isInitialized()) { memoizedIsInitialized = 0;
private boolean isMessageUndecryptable(MessageMetadata msgMetadata) { return (msgMetadata.getEncryptionKeysCount() > 0 && conf.getCryptoKeyReader() == null && conf.getCryptoFailureAction() == ConsumerCryptoFailureAction.CONSUME); }