You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by ud...@apache.org on 2017/10/23 23:36:22 UTC

[geode] branch feature/GEODE-3705 updated (fd9e7b3 -> 9f7d68e)

This is an automated email from the ASF dual-hosted git repository.

udo pushed a change to branch feature/GEODE-3705
in repository https://gitbox.apache.org/repos/asf/geode.git.


 discard fd9e7b3  GEODE-3705: Completed AuthenticationProcessor refactor
 discard 0182197  Adding SecurityProcessor.java and returning MessageExecutionContext.java
 discard 7b1efca  Initial commit to to clean up Authentication + Authorzation issues
 discard 38e031b  GEODE-3861: Marking test as Flaky
     add 9fc8b79  GEODE-3864: Added protobuf message file archiving
     add 46c0fe6  GEODE-3864: Added protobuf message file archiving
     add d7e7a06  GEODE-3068: fix alphabetical ordering
     add bbcfb83  GEODE-3866: add integration tests for deprecated launchers
     add 97ff1ae  Change DeprecatedAgentLauncherIntegrationTest to use TemporaryFolder
     add 674fd88  Isolate new methods accepting workingDirectory to only require workingDirectory
     add 674d4ae  Fix format with spotless
     add 58a28c7  GEODE-3847: upgrade to AssertJ 3.8.0
     add 8c873f9  Squashed commit of the following:
     add 472b96c  GEODE-3719: Improve invocations of disk store backups (#853)
     add 7e1d029  GEODE-3859: Simplify API for reading output from a GfshScript
     add ff6bfd9  GEODE-3830: Add more logging for GfshRule
     add dc9acd2  GEODE-3345: Refactor ClusterConfigurationDUnitTest to use test rules
     add 2cb5fed  GEODE-3810: Incremented test timestamp by 1 in case it is the same as the previous event
     add 378a1de  GEODE-3521: Correct a javadoc issue.
     add 65f6c6c  GEODE-1772: Removal of flaky tag.
     add b92f295  GEODE-3870: regenerate Region Entry classes from Linux
     add 70d428f  GEODE-3871 allow exclusion of serializable classes in AnalyzeSerializablesJUnitTest
     add caf71d8  GEODE-3882: ClusterConfiguration to support GatewayReceiver hostnameForSenders
     add c61d002  GEODE-3245: Flattening LuceneSerializer should support PDX values (#965)
     add 0e21c08  GEODE-1897: refactor GfshParseResult for easy access of converted opt… (#961)
     add c092bc6  GEODE-3885: Fix backup from AdminDistributedSystem (#964)
     add d0fcdfc  GEODE-1319: Awaitility clause added.
     add e358943  GEODE-1036: Refactored InitializeIndexEntryDestroyQueryDUnitTest
     add bbb097a  GEODE-3520: Additional tests for corrupt index
     add da45b65  User Guide: Data Storage corrections
     add 7c344c0  Merge branch 'feature/disk-store-doc' into develop
     add 0259f77  GEODE-3764: prevent early idle expiration (#940)
     new 2481747  GEODE-3861: Marking test as Flaky
     new 187df09  Initial commit to to clean up Authentication + Authorzation issues
     new f8d6089  Adding SecurityProcessor.java and returning MessageExecutionContext.java
     new 9f7d68e  GEODE-3705: Completed AuthenticationProcessor refactor

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (fd9e7b3)
            \
             N -- N -- N   refs/heads/feature/GEODE-3705 (9f7d68e)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 geode-assembly/build.gradle                        |   4 +
 .../StopServerWithSecurityAcceptanceTest.java      |   8 +-
 .../apache/geode/admin/AdminDistributedSystem.java |   1 -
 .../java/org/apache/geode/admin/BackupStatus.java  |  21 +-
 .../admin/internal/AdminDistributedSystemImpl.java |  37 +-
 .../geode/admin/internal/BackupStatusImpl.java     |  36 +-
 .../geode/admin/jmx/internal/AgentLauncher.java    |  12 +
 .../org/apache/geode/internal/DSFIDFactory.java    |   2 +
 .../geode/internal/DataSerializableFixedID.java    |   4 +-
 .../org/apache/geode/internal/SystemAdmin.java     |   9 +-
 .../java/org/apache/geode/internal/Version.java    |   1 +
 .../apache/geode/internal/cache/BackupUtil.java    |  75 +++
 .../geode/internal/cache/DistributedRegion.java    |   9 +-
 .../geode/internal/cache/EntryExpiryTask.java      |  32 ++
 .../apache/geode/internal/cache/ExpiryTask.java    |  37 +-
 ...tFilter.java => InternalDistributedRegion.java} |   9 +-
 .../geode/internal/cache/InternalRegion.java       |   5 +-
 .../cache/LatestLastAccessTimeMessage.java         |  93 ++++
 .../cache/LatestLastAccessTimeOperation.java       |  60 ++
 .../cache/LatestLastAccessTimeReplyProcessor.java  |  69 +++
 .../geode/internal/cache/LeafRegionEntry.cpp       |  47 +-
 .../apache/geode/internal/cache/LocalRegion.java   |   9 +
 .../apache/geode/internal/cache/RegionEntry.java   |   7 +
 .../cache/VMStatsDiskLRURegionEntryHeapIntKey.java | 118 +---
 .../VMStatsDiskLRURegionEntryHeapLongKey.java      | 116 +---
 .../VMStatsDiskLRURegionEntryHeapObjectKey.java    | 114 +---
 .../VMStatsDiskLRURegionEntryHeapStringKey1.java   | 114 +---
 .../VMStatsDiskLRURegionEntryHeapStringKey2.java   | 113 +---
 .../VMStatsDiskLRURegionEntryHeapUUIDKey.java      | 117 +---
 .../VMStatsDiskLRURegionEntryOffHeapIntKey.java    | 131 +----
 .../VMStatsDiskLRURegionEntryOffHeapLongKey.java   | 129 +----
 .../VMStatsDiskLRURegionEntryOffHeapObjectKey.java | 128 +----
 ...VMStatsDiskLRURegionEntryOffHeapStringKey1.java | 128 +----
 ...VMStatsDiskLRURegionEntryOffHeapStringKey2.java | 127 +----
 .../VMStatsDiskLRURegionEntryOffHeapUUIDKey.java   | 130 +----
 .../cache/VMStatsDiskRegionEntryHeapIntKey.java    | 101 +---
 .../cache/VMStatsDiskRegionEntryHeapLongKey.java   |  99 +---
 .../cache/VMStatsDiskRegionEntryHeapObjectKey.java |  98 +---
 .../VMStatsDiskRegionEntryHeapStringKey1.java      |  99 +---
 .../VMStatsDiskRegionEntryHeapStringKey2.java      |  98 +---
 .../cache/VMStatsDiskRegionEntryHeapUUIDKey.java   | 100 +---
 .../cache/VMStatsDiskRegionEntryOffHeapIntKey.java | 114 +---
 .../VMStatsDiskRegionEntryOffHeapLongKey.java      | 112 +---
 .../VMStatsDiskRegionEntryOffHeapObjectKey.java    | 111 +---
 .../VMStatsDiskRegionEntryOffHeapStringKey1.java   | 111 +---
 .../VMStatsDiskRegionEntryOffHeapStringKey2.java   | 110 +---
 .../VMStatsDiskRegionEntryOffHeapUUIDKey.java      | 113 +---
 .../cache/VMStatsLRURegionEntryHeapIntKey.java     |  70 +--
 .../cache/VMStatsLRURegionEntryHeapLongKey.java    |  68 +--
 .../cache/VMStatsLRURegionEntryHeapObjectKey.java  |  68 +--
 .../cache/VMStatsLRURegionEntryHeapStringKey1.java |  68 +--
 .../cache/VMStatsLRURegionEntryHeapStringKey2.java |  67 +--
 .../cache/VMStatsLRURegionEntryHeapUUIDKey.java    |  67 +--
 .../cache/VMStatsLRURegionEntryOffHeapIntKey.java  |  83 +--
 .../cache/VMStatsLRURegionEntryOffHeapLongKey.java |  81 +--
 .../VMStatsLRURegionEntryOffHeapObjectKey.java     |  81 +--
 .../VMStatsLRURegionEntryOffHeapStringKey1.java    |  80 +--
 .../VMStatsLRURegionEntryOffHeapStringKey2.java    |  79 +--
 .../cache/VMStatsLRURegionEntryOffHeapUUIDKey.java |  80 +--
 .../cache/VMStatsRegionEntryHeapIntKey.java        |  52 +-
 .../cache/VMStatsRegionEntryHeapLongKey.java       |  50 +-
 .../cache/VMStatsRegionEntryHeapObjectKey.java     |  50 +-
 .../cache/VMStatsRegionEntryHeapStringKey1.java    |  50 +-
 .../cache/VMStatsRegionEntryHeapStringKey2.java    |  49 +-
 .../cache/VMStatsRegionEntryHeapUUIDKey.java       |  49 +-
 .../cache/VMStatsRegionEntryOffHeapIntKey.java     |  65 +--
 .../cache/VMStatsRegionEntryOffHeapLongKey.java    |  63 +--
 .../cache/VMStatsRegionEntryOffHeapObjectKey.java  |  63 +--
 .../cache/VMStatsRegionEntryOffHeapStringKey1.java |  62 +--
 .../cache/VMStatsRegionEntryOffHeapStringKey2.java |  61 +-
 .../cache/VMStatsRegionEntryOffHeapUUIDKey.java    |  62 +--
 .../cache/VMThinDiskLRURegionEntryHeapIntKey.java  | 107 +---
 .../cache/VMThinDiskLRURegionEntryHeapLongKey.java | 105 +---
 .../VMThinDiskLRURegionEntryHeapObjectKey.java     | 103 +---
 .../VMThinDiskLRURegionEntryHeapStringKey1.java    | 103 +---
 .../VMThinDiskLRURegionEntryHeapStringKey2.java    | 102 +---
 .../cache/VMThinDiskLRURegionEntryHeapUUIDKey.java | 106 +---
 .../VMThinDiskLRURegionEntryOffHeapIntKey.java     | 120 +---
 .../VMThinDiskLRURegionEntryOffHeapLongKey.java    | 118 +---
 .../VMThinDiskLRURegionEntryOffHeapObjectKey.java  | 117 +---
 .../VMThinDiskLRURegionEntryOffHeapStringKey1.java | 117 +---
 .../VMThinDiskLRURegionEntryOffHeapStringKey2.java | 116 +---
 .../VMThinDiskLRURegionEntryOffHeapUUIDKey.java    | 119 +---
 .../cache/VMThinDiskRegionEntryHeapIntKey.java     |  89 +--
 .../cache/VMThinDiskRegionEntryHeapLongKey.java    |  87 +--
 .../cache/VMThinDiskRegionEntryHeapObjectKey.java  |  86 +--
 .../cache/VMThinDiskRegionEntryHeapStringKey1.java |  87 +--
 .../cache/VMThinDiskRegionEntryHeapStringKey2.java |  86 +--
 .../cache/VMThinDiskRegionEntryHeapUUIDKey.java    |  88 +--
 .../cache/VMThinDiskRegionEntryOffHeapIntKey.java  | 102 +---
 .../cache/VMThinDiskRegionEntryOffHeapLongKey.java | 100 +---
 .../VMThinDiskRegionEntryOffHeapObjectKey.java     |  99 +---
 .../VMThinDiskRegionEntryOffHeapStringKey1.java    |  99 +---
 .../VMThinDiskRegionEntryOffHeapStringKey2.java    |  98 +---
 .../cache/VMThinDiskRegionEntryOffHeapUUIDKey.java | 101 +---
 .../cache/VMThinLRURegionEntryHeapIntKey.java      |  59 +-
 .../cache/VMThinLRURegionEntryHeapLongKey.java     |  57 +-
 .../cache/VMThinLRURegionEntryHeapObjectKey.java   |  57 +-
 .../cache/VMThinLRURegionEntryHeapStringKey1.java  |  57 +-
 .../cache/VMThinLRURegionEntryHeapStringKey2.java  |  56 +-
 .../cache/VMThinLRURegionEntryHeapUUIDKey.java     |  56 +-
 .../cache/VMThinLRURegionEntryOffHeapIntKey.java   |  72 +--
 .../cache/VMThinLRURegionEntryOffHeapLongKey.java  |  70 +--
 .../VMThinLRURegionEntryOffHeapObjectKey.java      |  70 +--
 .../VMThinLRURegionEntryOffHeapStringKey1.java     |  69 +--
 .../VMThinLRURegionEntryOffHeapStringKey2.java     |  68 +--
 .../cache/VMThinLRURegionEntryOffHeapUUIDKey.java  |  69 +--
 .../cache/VMThinRegionEntryHeapIntKey.java         |  40 +-
 .../cache/VMThinRegionEntryHeapLongKey.java        |  38 +-
 .../cache/VMThinRegionEntryHeapObjectKey.java      |  38 +-
 .../cache/VMThinRegionEntryHeapStringKey1.java     |  38 +-
 .../cache/VMThinRegionEntryHeapStringKey2.java     |  37 +-
 .../cache/VMThinRegionEntryHeapUUIDKey.java        |  37 +-
 .../cache/VMThinRegionEntryOffHeapIntKey.java      |  53 +-
 .../cache/VMThinRegionEntryOffHeapLongKey.java     |  51 +-
 .../cache/VMThinRegionEntryOffHeapObjectKey.java   |  51 +-
 .../cache/VMThinRegionEntryOffHeapStringKey1.java  |  50 +-
 .../cache/VMThinRegionEntryOffHeapStringKey2.java  |  49 +-
 .../cache/VMThinRegionEntryOffHeapUUIDKey.java     |  50 +-
 ...VersionedStatsDiskLRURegionEntryHeapIntKey.java | 126 +----
 ...ersionedStatsDiskLRURegionEntryHeapLongKey.java | 124 +----
 ...sionedStatsDiskLRURegionEntryHeapObjectKey.java | 123 +---
 ...ionedStatsDiskLRURegionEntryHeapStringKey1.java | 123 +---
 ...ionedStatsDiskLRURegionEntryHeapStringKey2.java | 122 +---
 ...ersionedStatsDiskLRURegionEntryHeapUUIDKey.java | 125 +----
 ...sionedStatsDiskLRURegionEntryOffHeapIntKey.java | 140 +----
 ...ionedStatsDiskLRURegionEntryOffHeapLongKey.java | 138 +----
 ...nedStatsDiskLRURegionEntryOffHeapObjectKey.java | 137 +----
 ...edStatsDiskLRURegionEntryOffHeapStringKey1.java | 137 +----
 ...edStatsDiskLRURegionEntryOffHeapStringKey2.java | 136 +----
 ...ionedStatsDiskLRURegionEntryOffHeapUUIDKey.java | 139 +----
 .../VersionedStatsDiskRegionEntryHeapIntKey.java   | 109 +---
 .../VersionedStatsDiskRegionEntryHeapLongKey.java  | 107 +---
 ...VersionedStatsDiskRegionEntryHeapObjectKey.java | 106 +---
 ...ersionedStatsDiskRegionEntryHeapStringKey1.java | 106 +---
 ...ersionedStatsDiskRegionEntryHeapStringKey2.java | 105 +---
 .../VersionedStatsDiskRegionEntryHeapUUIDKey.java  | 108 +---
 ...VersionedStatsDiskRegionEntryOffHeapIntKey.java | 123 +---
 ...ersionedStatsDiskRegionEntryOffHeapLongKey.java | 121 +---
 ...sionedStatsDiskRegionEntryOffHeapObjectKey.java | 120 +---
 ...ionedStatsDiskRegionEntryOffHeapStringKey1.java | 120 +---
 ...ionedStatsDiskRegionEntryOffHeapStringKey2.java | 119 +---
 ...ersionedStatsDiskRegionEntryOffHeapUUIDKey.java | 122 +---
 .../VersionedStatsLRURegionEntryHeapIntKey.java    |  79 +--
 .../VersionedStatsLRURegionEntryHeapLongKey.java   |  76 +--
 .../VersionedStatsLRURegionEntryHeapObjectKey.java |  76 +--
 ...VersionedStatsLRURegionEntryHeapStringKey1.java |  75 +--
 ...VersionedStatsLRURegionEntryHeapStringKey2.java |  74 +--
 .../VersionedStatsLRURegionEntryHeapUUIDKey.java   |  75 +--
 .../VersionedStatsLRURegionEntryOffHeapIntKey.java |  92 +--
 ...VersionedStatsLRURegionEntryOffHeapLongKey.java |  90 +--
 ...rsionedStatsLRURegionEntryOffHeapObjectKey.java |  90 +--
 ...sionedStatsLRURegionEntryOffHeapStringKey1.java |  89 +--
 ...sionedStatsLRURegionEntryOffHeapStringKey2.java |  88 +--
 ...VersionedStatsLRURegionEntryOffHeapUUIDKey.java |  89 +--
 .../cache/VersionedStatsRegionEntryHeapIntKey.java |  61 +-
 .../VersionedStatsRegionEntryHeapLongKey.java      |  59 +-
 .../VersionedStatsRegionEntryHeapObjectKey.java    |  58 +-
 .../VersionedStatsRegionEntryHeapStringKey1.java   |  57 +-
 .../VersionedStatsRegionEntryHeapStringKey2.java   |  56 +-
 .../VersionedStatsRegionEntryHeapUUIDKey.java      |  58 +-
 .../VersionedStatsRegionEntryOffHeapIntKey.java    |  74 +--
 .../VersionedStatsRegionEntryOffHeapLongKey.java   |  72 +--
 .../VersionedStatsRegionEntryOffHeapObjectKey.java |  72 +--
 ...VersionedStatsRegionEntryOffHeapStringKey1.java |  71 +--
 ...VersionedStatsRegionEntryOffHeapStringKey2.java |  70 +--
 .../VersionedStatsRegionEntryOffHeapUUIDKey.java   |  71 +--
 .../VersionedThinDiskLRURegionEntryHeapIntKey.java | 115 +---
 ...VersionedThinDiskLRURegionEntryHeapLongKey.java | 113 +---
 ...rsionedThinDiskLRURegionEntryHeapObjectKey.java | 112 +---
 ...sionedThinDiskLRURegionEntryHeapStringKey1.java | 112 +---
 ...sionedThinDiskLRURegionEntryHeapStringKey2.java | 111 +---
 ...VersionedThinDiskLRURegionEntryHeapUUIDKey.java | 114 +---
 ...rsionedThinDiskLRURegionEntryOffHeapIntKey.java | 129 +----
 ...sionedThinDiskLRURegionEntryOffHeapLongKey.java | 127 +----
 ...onedThinDiskLRURegionEntryOffHeapObjectKey.java | 126 +----
 ...nedThinDiskLRURegionEntryOffHeapStringKey1.java | 126 +----
 ...nedThinDiskLRURegionEntryOffHeapStringKey2.java | 125 +----
 ...sionedThinDiskLRURegionEntryOffHeapUUIDKey.java | 128 +----
 .../VersionedThinDiskRegionEntryHeapIntKey.java    |  98 +---
 .../VersionedThinDiskRegionEntryHeapLongKey.java   |  95 +---
 .../VersionedThinDiskRegionEntryHeapObjectKey.java |  94 +---
 ...VersionedThinDiskRegionEntryHeapStringKey1.java |  94 +---
 ...VersionedThinDiskRegionEntryHeapStringKey2.java |  93 +---
 .../VersionedThinDiskRegionEntryHeapUUIDKey.java   |  96 +---
 .../VersionedThinDiskRegionEntryOffHeapIntKey.java | 111 +---
 ...VersionedThinDiskRegionEntryOffHeapLongKey.java | 109 +---
 ...rsionedThinDiskRegionEntryOffHeapObjectKey.java | 108 +---
 ...sionedThinDiskRegionEntryOffHeapStringKey1.java | 108 +---
 ...sionedThinDiskRegionEntryOffHeapStringKey2.java | 107 +---
 ...VersionedThinDiskRegionEntryOffHeapUUIDKey.java | 110 +---
 .../VersionedThinLRURegionEntryHeapIntKey.java     |  68 +--
 .../VersionedThinLRURegionEntryHeapLongKey.java    |  65 +--
 .../VersionedThinLRURegionEntryHeapObjectKey.java  |  65 +--
 .../VersionedThinLRURegionEntryHeapStringKey1.java |  64 +--
 .../VersionedThinLRURegionEntryHeapStringKey2.java |  63 +--
 .../VersionedThinLRURegionEntryHeapUUIDKey.java    |  64 +--
 .../VersionedThinLRURegionEntryOffHeapIntKey.java  |  81 +--
 .../VersionedThinLRURegionEntryOffHeapLongKey.java |  79 +--
 ...ersionedThinLRURegionEntryOffHeapObjectKey.java |  79 +--
 ...rsionedThinLRURegionEntryOffHeapStringKey1.java |  78 +--
 ...rsionedThinLRURegionEntryOffHeapStringKey2.java |  77 +--
 .../VersionedThinLRURegionEntryOffHeapUUIDKey.java |  78 +--
 .../cache/VersionedThinRegionEntryHeapIntKey.java  |  49 +-
 .../cache/VersionedThinRegionEntryHeapLongKey.java |  47 +-
 .../VersionedThinRegionEntryHeapObjectKey.java     |  46 +-
 .../VersionedThinRegionEntryHeapStringKey1.java    |  45 +-
 .../VersionedThinRegionEntryHeapStringKey2.java    |  44 +-
 .../cache/VersionedThinRegionEntryHeapUUIDKey.java |  46 +-
 .../VersionedThinRegionEntryOffHeapIntKey.java     |  62 +--
 .../VersionedThinRegionEntryOffHeapLongKey.java    |  60 +-
 .../VersionedThinRegionEntryOffHeapObjectKey.java  |  60 +-
 .../VersionedThinRegionEntryOffHeapStringKey1.java |  59 +-
 .../VersionedThinRegionEntryOffHeapStringKey2.java |  58 +-
 .../VersionedThinRegionEntryOffHeapUUIDKey.java    |  59 +-
 .../internal/cache/xmlcache/CacheXmlGenerator.java |   3 +
 .../geode/internal/lang/SystemPropertyHelper.java  |  17 +-
 .../geode/{admin => management}/BackupStatus.java  |   9 +-
 .../apache/geode/management/DiskBackupStatus.java  |  37 +-
 .../internal/BackupStatusImpl.java                 |   6 +-
 .../DiskBackupStatusImpl.java}                     |  58 +-
 .../internal/beans/DistributedSystemBridge.java    |  48 +-
 .../management/internal/cli/CommandRequest.java    |   5 -
 .../management/internal/cli/GfshParseResult.java   |  39 +-
 .../cli/commands/AlterRuntimeConfigCommand.java    |   3 +-
 .../cli/commands/BackupDiskStoreCommand.java       |   9 +-
 .../cli/commands/ChangeLogLevelCommand.java        |   4 +-
 .../cli/commands/DestroyFunctionCommand.java       |  23 +-
 .../cli/commands/ExecuteFunctionCommand.java       |   8 +-
 .../internal/cli/commands/ExportConfigCommand.java |   4 +-
 .../ExportImportClusterConfigurationCommands.java  |   8 +-
 .../cli/commands/ExportLogsInterceptor.java        |  34 +-
 .../internal/cli/commands/ShowMetricsCommand.java  |   8 +-
 .../internal/cli/domain/DataCommandRequest.java    |  36 +-
 .../DeprecatedAgentLauncherIntegrationTest.java    | 303 ++++++++++
 .../CacheServerSSLConnectionDUnitTest.java         | 209 ++++---
 .../client/internal/SSLNoClientAuthDUnitTest.java  |   3 +-
 .../query/dunit/CorruptedIndexIntegrationTest.java |  55 ++
 .../InitializeIndexEntryDestroyQueryDUnitTest.java | 519 ++++++-----------
 .../AnalyzeSerializablesJUnitTest.java             |  14 +-
 .../geode/internal/cache/BackupDUnitTest.java      |   2 +-
 ...precatedCacheServerLauncherIntegrationTest.java | 618 +++++++++++++++++++++
 .../internal/cache/IncrementalBackupDUnitTest.java |  75 +--
 ...nitTest.java => PREntryIdleExpirationTest.java} |  55 +-
 .../cache/ReplicateEntryIdleExpirationTest.java    | 128 +++++
 .../ExtensionClusterConfigurationDUnitTest.java    | 217 ++++++++
 .../PersistentPartitionedRegionTestBase.java       |  21 +-
 .../geode/management/DiskBackupStatusTest.java     | 105 ++++
 .../geode/management/DiskManagementDUnitTest.java  |   2 +-
 .../internal/cli/CommandRequestTest.java           | 162 ------
 .../internal/cli/GfshParserConverterTest.java      |  10 +-
 .../internal/cli/GfshParserParsingTest.java        | 112 ++--
 .../internal/cli/OptionAliasesParsingTest.java     |  12 +-
 .../commands/ExportLogsInterceptorJUnitTest.java   |  36 +-
 .../cli/commands/LogLevelInterceptorTest.java      |  21 +-
 .../apache/geode/codeAnalysis/excludedClasses.txt  | 272 +++++++--
 .../org/apache/geode/codeAnalysis/openBugs.txt     |   3 -
 .../codeAnalysis/sanctionedDataSerializables.txt   |   4 +
 .../geode/codeAnalysis/sanctionedSerializables.txt | 218 +-------
 .../file_names_and_extensions.html.md.erb          |  15 +-
 .../disk_storage/how_disk_stores_work.html.md.erb  |  17 +-
 .../geode/test/junit/rules/gfsh/GfshExecution.java |  81 ++-
 .../geode/test/junit/rules/gfsh/GfshRule.java      |  21 +-
 .../geode/test/junit/rules/gfsh/GfshScript.java    |  45 +-
 .../test/junit/rules/gfsh/internal/OutputLine.java |  39 +-
 .../rules/gfsh/{ => internal}/ProcessLogger.java   |  40 +-
 .../rules/gfsh/{ => internal}/StreamGobbler.java   |   2 +-
 .../geode/cache/lucene/FlatFormatSerializer.java   |  37 +-
 .../lucene/FlatFormatPdxSerializerJunitTest.java   | 169 ++++++
 .../lucene/FlatFormatSerializerJUnitTest.java      | 114 ++--
 .../apache/geode/cache/lucene/LocalCacheRule.java} |  26 +-
 .../NestedObjectSeralizerIntegrationTest.java      | 349 +++++++++++-
 geode-protobuf/build.gradle                        |  10 +-
 .../internal/cache/UpdateVersionDUnitTest.java     |  24 +-
 ...ParallelGatewaySenderOperation_1_DUnitTest.java |   6 -
 .../cache/wan/misc/PDXNewWanDUnitTest.java         |  14 +-
 .../ClusterConfigurationDUnitTest.java             | 511 -----------------
 .../WANClusterConfigurationDUnitTest.java          | 157 ++++++
 gradle/dependency-versions.properties              |  15 +-
 279 files changed, 4948 insertions(+), 17777 deletions(-)
 create mode 100644 geode-core/src/main/java/org/apache/geode/internal/cache/BackupUtil.java
 copy geode-core/src/main/java/org/apache/geode/internal/cache/{GatewayEventFilter.java => InternalDistributedRegion.java} (88%)
 create mode 100644 geode-core/src/main/java/org/apache/geode/internal/cache/LatestLastAccessTimeMessage.java
 create mode 100644 geode-core/src/main/java/org/apache/geode/internal/cache/LatestLastAccessTimeOperation.java
 create mode 100644 geode-core/src/main/java/org/apache/geode/internal/cache/LatestLastAccessTimeReplyProcessor.java
 copy geode-core/src/main/java/org/apache/geode/{admin => management}/BackupStatus.java (85%)
 copy geode-core/src/main/java/org/apache/geode/{admin => management}/internal/BackupStatusImpl.java (92%)
 copy geode-core/src/main/java/org/apache/geode/management/{DiskBackupStatus.java => internal/DiskBackupStatusImpl.java} (52%)
 create mode 100644 geode-core/src/test/java/org/apache/geode/admin/jmx/internal/DeprecatedAgentLauncherIntegrationTest.java
 create mode 100755 geode-core/src/test/java/org/apache/geode/internal/cache/DeprecatedCacheServerLauncherIntegrationTest.java
 copy geode-core/src/test/java/org/apache/geode/internal/cache/{execute/FunctionServicePeerAccessorRRDUnitTest.java => PREntryIdleExpirationTest.java} (50%)
 create mode 100644 geode-core/src/test/java/org/apache/geode/internal/cache/ReplicateEntryIdleExpirationTest.java
 create mode 100644 geode-core/src/test/java/org/apache/geode/internal/cache/extension/ExtensionClusterConfigurationDUnitTest.java
 create mode 100644 geode-core/src/test/java/org/apache/geode/management/DiskBackupStatusTest.java
 delete mode 100644 geode-core/src/test/java/org/apache/geode/management/internal/cli/CommandRequestTest.java
 copy geode-core/src/main/java/org/apache/geode/cache/query/internal/cq/MissingCqServiceStatistics.java => geode-junit/src/main/java/org/apache/geode/test/junit/rules/gfsh/internal/OutputLine.java (56%)
 rename geode-junit/src/main/java/org/apache/geode/test/junit/rules/gfsh/{ => internal}/ProcessLogger.java (72%)
 rename geode-junit/src/main/java/org/apache/geode/test/junit/rules/gfsh/{ => internal}/StreamGobbler.java (96%)
 create mode 100644 geode-lucene/src/test/java/org/apache/geode/cache/lucene/FlatFormatPdxSerializerJunitTest.java
 copy geode-lucene/src/{main/java/org/apache/geode/cache/lucene/internal/xml/LuceneServiceXmlGenerator.java => test/java/org/apache/geode/cache/lucene/LocalCacheRule.java} (60%)
 delete mode 100644 geode-wan/src/test/java/org/apache/geode/management/internal/configuration/ClusterConfigurationDUnitTest.java
 create mode 100644 geode-wan/src/test/java/org/apache/geode/management/internal/configuration/WANClusterConfigurationDUnitTest.java

-- 
To stop receiving notification emails like this one, please contact
['"commits@geode.apache.org" <co...@geode.apache.org>'].

[geode] 01/04: GEODE-3861: Marking test as Flaky

Posted by ud...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

udo pushed a commit to branch feature/GEODE-3705
in repository https://gitbox.apache.org/repos/asf/geode.git

commit 2481747e87e20b3b797d10b94842366e038821ae
Author: kohlmu-pivotal <uk...@pivotal.io>
AuthorDate: Thu Oct 19 15:38:47 2017 -0700

    GEODE-3861: Marking test as Flaky
---
 .../internal/cache/tier/sockets/ClientHealthMonitorJUnitTest.java      | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/ClientHealthMonitorJUnitTest.java b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/ClientHealthMonitorJUnitTest.java
index a8734fd..af086fc 100755
--- a/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/ClientHealthMonitorJUnitTest.java
+++ b/geode-core/src/test/java/org/apache/geode/internal/cache/tier/sockets/ClientHealthMonitorJUnitTest.java
@@ -47,12 +47,13 @@ import org.apache.geode.internal.AvailablePort;
 import org.apache.geode.internal.cache.EventID;
 import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.test.junit.categories.ClientServerTest;
+import org.apache.geode.test.junit.categories.FlakyTest;
 import org.apache.geode.test.junit.categories.IntegrationTest;
 
 /**
  * This is a functional-test for <code>ClientHealthMonitor</code>.
  */
-@Category({IntegrationTest.class, ClientServerTest.class})
+@Category({IntegrationTest.class, ClientServerTest.class, FlakyTest.class})
 public class ClientHealthMonitorJUnitTest {
   /**
    * Default to 0; override in sub tests to add thread pool

-- 
To stop receiving notification emails like this one, please contact
"commits@geode.apache.org" <co...@geode.apache.org>.

[geode] 04/04: GEODE-3705: Completed AuthenticationProcessor refactor

Posted by ud...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

udo pushed a commit to branch feature/GEODE-3705
in repository https://gitbox.apache.org/repos/asf/geode.git

commit 9f7d68ee4304dae1ef44ba5635cbc91d72723bbb
Author: kohlmu-pivotal <uk...@pivotal.io>
AuthorDate: Mon Oct 23 16:33:29 2017 -0700

    GEODE-3705: Completed AuthenticationProcessor refactor
---
 .../distributed/internal/InternalLocator.java      |   1 -
 .../distributed/internal/tcpserver/TcpServer.java  |   6 +-
 .../protocol}/ClientProtocolProcessor.java         |   2 +-
 .../protocol}/ClientProtocolService.java           |   4 +-
 .../protocol}/ClientProtocolServiceLoader.java     |   4 +-
 .../sockets/GenericProtocolServerConnection.java   |   1 +
 .../tier/sockets/ServerConnectionFactory.java      |   3 +
 .../cache/tier/sockets/TcpServerFactory.java       |   1 +
 .../ClientProtocolMessageHandler.java              |  18 +--
 .../apache/geode/internal/protocol/Failure.java    |  17 +--
 .../apache/geode/internal/protocol/Handshaker.java |  63 -----------
 .../MessageExecutionContext.java                   |  24 ++--
 .../geode/internal/protocol/OperationContext.java  |   4 +-
 .../geode/internal/protocol/ProtocolErrorCode.java |   1 -
 .../org/apache/geode/internal/protocol/Result.java |   4 +-
 .../apache/geode/internal/protocol/Success.java    |  18 +--
 .../handshaker/ClientProtocolHandshaker.java       |  29 -----
 .../protocol/operations/OperationHandler.java      |   4 +-
 .../{ => protobuf}/ProtobufCachePipeline.java      |  25 ++---
 .../{ => protobuf}/ProtobufLocatorPipeline.java    |   7 +-
 .../protocol/protobuf/ProtobufOpsProcessor.java    |  45 ++++----
 .../{ => protobuf}/ProtobufProtocolService.java    |  25 ++---
 .../protocol/protobuf/ProtobufStreamProcessor.java |  29 ++---
 .../operations/GetAllRequestOperationHandler.java  |   8 +-
 .../GetAvailableServersOperationHandler.java       |   6 +-
 .../GetRegionNamesRequestOperationHandler.java     |   6 +-
 .../GetRegionRequestOperationHandler.java          |   8 +-
 .../operations/GetRequestOperationHandler.java     |  17 ++-
 .../operations/PutAllRequestOperationHandler.java  |   8 +-
 .../operations/PutRequestOperationHandler.java     |  12 +-
 .../operations/RemoveRequestOperationHandler.java  |  12 +-
 .../HandshakerRequestOperationHandler.java         |  54 ---------
 .../AuthenticationRequestOperationHandler.java     |  45 +++++---
 .../ProtobufOperationContextRegistry.java}         |   6 +-
 .../security/InvalidConfigAuthenticator.java       |   3 +-
 .../security/ProtobufShiroAuthenticator.java       |  13 +--
 .../protobuf/security/ProtobufShiroAuthorizer.java |   2 -
 ...mpatibleAuthenticationMechanismsException.java} |  30 ++---
 .../AuthenticationSecurityProcessor.java           |  10 +-
 .../security/AuthenticationLookupService.java      |  35 ------
 .../security/AuthorizationLookupService.java       |  40 -------
 .../protocol/security/SecurityLookupService.java   |  97 ++++++++++++++++
 .../protocol/security/SecurityProcessor.java       |   7 +-
 .../processors/AuthorizationSecurityProcessor.java |  13 +--
 .../NoAuthenticationSecurityProcessor.java         |  15 ++-
 ...nal.cache.client.protocol.ClientProtocolService |   1 +
 ...ternal.cache.tier.sockets.ClientProtocolService |   1 -
 .../GenericProtocolServerConnectionTest.java       |   3 +-
 .../protocol/AuthenticationIntegrationTest.java    |   8 +-
 .../ProtobufTestExecutionContext.java              |  16 ++-
 .../internal/protocol/protobuf/HandshakerTest.java | 124 ---------------------
 .../ProtobufProtocolServiceJUnitTest.java          |   3 +-
 .../protobuf/ProtobufStreamProcessorTest.java      |  11 +-
 .../protocol/protobuf/ProtobufTestUtilities.java   |  60 ----------
 .../GetAllRequestOperationHandlerJUnitTest.java    |  19 ++--
 ...tAvailableServersOperationHandlerJUnitTest.java |  20 ++--
 ...egionNamesRequestOperationHandlerJUnitTest.java |  26 +++--
 .../GetRegionRequestOperationHandlerJUnitTest.java |  12 +-
 .../GetRequestOperationHandlerJUnitTest.java       |  23 ++--
 .../PutAllRequestOperationHandlerJUnitTest.java    |  15 ++-
 .../PutRequestOperationHandlerJUnitTest.java       |  22 ++--
 .../RemoveRequestOperationHandlerJUnitTest.java    |  19 ++--
 62 files changed, 415 insertions(+), 750 deletions(-)

diff --git a/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalLocator.java b/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalLocator.java
index 9b0ad22..06603cc 100644
--- a/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalLocator.java
+++ b/geode-core/src/main/java/org/apache/geode/distributed/internal/InternalLocator.java
@@ -62,7 +62,6 @@ import org.apache.geode.distributed.internal.tcpserver.TcpServer;
 import org.apache.geode.internal.admin.remote.DistributionLocatorId;
 import org.apache.geode.internal.cache.GemFireCacheImpl;
 import org.apache.geode.internal.cache.InternalCache;
-import org.apache.geode.internal.cache.tier.sockets.ClientProtocolService;
 import org.apache.geode.internal.cache.tier.sockets.TcpServerFactory;
 import org.apache.geode.internal.cache.wan.WANServiceProvider;
 import org.apache.geode.internal.i18n.LocalizedStrings;
diff --git a/geode-core/src/main/java/org/apache/geode/distributed/internal/tcpserver/TcpServer.java b/geode-core/src/main/java/org/apache/geode/distributed/internal/tcpserver/TcpServer.java
index 34a34d6..a673c03 100755
--- a/geode-core/src/main/java/org/apache/geode/distributed/internal/tcpserver/TcpServer.java
+++ b/geode-core/src/main/java/org/apache/geode/distributed/internal/tcpserver/TcpServer.java
@@ -59,9 +59,9 @@ import org.apache.geode.internal.VersionedDataInputStream;
 import org.apache.geode.internal.VersionedDataOutputStream;
 import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.internal.cache.tier.CommunicationMode;
-import org.apache.geode.internal.cache.tier.sockets.ClientProtocolProcessor;
-import org.apache.geode.internal.cache.tier.sockets.ClientProtocolService;
-import org.apache.geode.internal.cache.tier.sockets.ClientProtocolServiceLoader;
+import org.apache.geode.internal.cache.client.protocol.ClientProtocolProcessor;
+import org.apache.geode.internal.cache.client.protocol.ClientProtocolService;
+import org.apache.geode.internal.cache.client.protocol.ClientProtocolServiceLoader;
 import org.apache.geode.internal.cache.tier.sockets.HandShake;
 import org.apache.geode.internal.cache.tier.sockets.ServiceLoadingFailureException;
 import org.apache.geode.internal.logging.LogService;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/ClientProtocolProcessor.java b/geode-core/src/main/java/org/apache/geode/internal/cache/client/protocol/ClientProtocolProcessor.java
similarity index 96%
rename from geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/ClientProtocolProcessor.java
rename to geode-core/src/main/java/org/apache/geode/internal/cache/client/protocol/ClientProtocolProcessor.java
index 30b4baf..e49f16f 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/ClientProtocolProcessor.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/client/protocol/ClientProtocolProcessor.java
@@ -13,7 +13,7 @@
  * the License.
  */
 
-package org.apache.geode.internal.cache.tier.sockets;
+package org.apache.geode.internal.cache.client.protocol;
 
 import java.io.IOException;
 import java.io.InputStream;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/ClientProtocolService.java b/geode-core/src/main/java/org/apache/geode/internal/cache/client/protocol/ClientProtocolService.java
similarity index 95%
rename from geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/ClientProtocolService.java
rename to geode-core/src/main/java/org/apache/geode/internal/cache/client/protocol/ClientProtocolService.java
index 79a33a4..7f50c9f 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/ClientProtocolService.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/client/protocol/ClientProtocolService.java
@@ -13,9 +13,7 @@
  * the License.
  */
 
-package org.apache.geode.internal.cache.tier.sockets;
-
-import java.util.Map;
+package org.apache.geode.internal.cache.client.protocol;
 
 import org.apache.geode.StatisticsFactory;
 import org.apache.geode.cache.Cache;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/ClientProtocolServiceLoader.java b/geode-core/src/main/java/org/apache/geode/internal/cache/client/protocol/ClientProtocolServiceLoader.java
similarity index 93%
rename from geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/ClientProtocolServiceLoader.java
rename to geode-core/src/main/java/org/apache/geode/internal/cache/client/protocol/ClientProtocolServiceLoader.java
index 8b069ad..c7ba6e0 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/ClientProtocolServiceLoader.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/client/protocol/ClientProtocolServiceLoader.java
@@ -13,12 +13,14 @@
  * the License.
  */
 
-package org.apache.geode.internal.cache.tier.sockets;
+package org.apache.geode.internal.cache.client.protocol;
 
 import java.util.LinkedList;
 import java.util.List;
 import java.util.ServiceLoader;
 
+import org.apache.geode.internal.cache.tier.sockets.ServiceLoadingFailureException;
+
 public class ClientProtocolServiceLoader {
   private final List<ClientProtocolService> clientProtocolServices;
 
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/GenericProtocolServerConnection.java b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/GenericProtocolServerConnection.java
index 2671cbe..8063bf0 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/GenericProtocolServerConnection.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/GenericProtocolServerConnection.java
@@ -28,6 +28,7 @@ import org.apache.geode.distributed.DistributedMember;
 import org.apache.geode.distributed.internal.ServerLocation;
 import org.apache.geode.distributed.internal.membership.InternalDistributedMember;
 import org.apache.geode.internal.cache.InternalCache;
+import org.apache.geode.internal.cache.client.protocol.ClientProtocolProcessor;
 import org.apache.geode.internal.cache.tier.Acceptor;
 import org.apache.geode.internal.cache.tier.CachedRegionHelper;
 import org.apache.geode.internal.cache.tier.CommunicationMode;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/ServerConnectionFactory.java b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/ServerConnectionFactory.java
index 5f0757f..a6fc973 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/ServerConnectionFactory.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/ServerConnectionFactory.java
@@ -22,6 +22,9 @@ import java.net.Socket;
 
 import org.apache.geode.StatisticsFactory;
 import org.apache.geode.internal.cache.InternalCache;
+import org.apache.geode.internal.cache.client.protocol.ClientProtocolProcessor;
+import org.apache.geode.internal.cache.client.protocol.ClientProtocolService;
+import org.apache.geode.internal.cache.client.protocol.ClientProtocolServiceLoader;
 import org.apache.geode.internal.cache.tier.Acceptor;
 import org.apache.geode.internal.cache.tier.CachedRegionHelper;
 import org.apache.geode.internal.security.SecurityService;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/TcpServerFactory.java b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/TcpServerFactory.java
index 47b26d8..1f16dfd 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/TcpServerFactory.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/TcpServerFactory.java
@@ -25,6 +25,7 @@ import org.apache.geode.distributed.internal.InternalLocator;
 import org.apache.geode.distributed.internal.PoolStatHelper;
 import org.apache.geode.distributed.internal.tcpserver.TcpHandler;
 import org.apache.geode.distributed.internal.tcpserver.TcpServer;
+import org.apache.geode.internal.cache.client.protocol.ClientProtocolServiceLoader;
 import org.apache.geode.internal.logging.LogService;
 
 public class TcpServerFactory {
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/cache/tier/sockets/ClientProtocolMessageHandler.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/ClientProtocolMessageHandler.java
similarity index 72%
rename from geode-protobuf/src/main/java/org/apache/geode/internal/cache/tier/sockets/ClientProtocolMessageHandler.java
rename to geode-protobuf/src/main/java/org/apache/geode/internal/protocol/ClientProtocolMessageHandler.java
index c1250e1..559f7e1 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/cache/tier/sockets/ClientProtocolMessageHandler.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/ClientProtocolMessageHandler.java
@@ -13,28 +13,28 @@
  * the License.
  */
 
-package org.apache.geode.internal.cache.tier.sockets;
+package org.apache.geode.internal.protocol;
 
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 
-import org.apache.geode.StatisticsFactory;
+import org.apache.geode.internal.cache.tier.sockets.GenericProtocolServerConnection;
+import org.apache.geode.internal.cache.tier.sockets.ServerConnectionFactory;
 
 
 /**
- * This is an interface that other modules can implement to hook into {@link
- * GenericProtocolServerConnection} to handle messages sent to Geode.
+ * This is an interface that other modules can implement to hook into
+ * {@link GenericProtocolServerConnection} to handle messages sent to Geode.
  *
  * Currently, only one {@link ClientProtocolMessageHandler} at a time can be used in a Geode
- * instance. It gets wired into {@link ServerConnectionFactory} to create all instances of {@link
- * GenericProtocolServerConnection}.
+ * instance. It gets wired into {@link ServerConnectionFactory} to create all instances of
+ * {@link GenericProtocolServerConnection}.
  *
  * Implementors of this interface are expected to be able to be used for any number of connections
  * at a time (stateless except for the statistics).
  */
 public interface ClientProtocolMessageHandler {
-  MessageExecutionContext receiveMessage(InputStream inputStream, OutputStream outputStream,
-                                         MessageExecutionContext executionContext)
-      throws IOException;
+  void receiveMessage(InputStream inputStream, OutputStream outputStream,
+      MessageExecutionContext executionContext) throws IOException;
 }
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/Failure.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/Failure.java
index cfcd46d..7bb22e7 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/Failure.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/Failure.java
@@ -20,31 +20,24 @@ import org.apache.geode.annotations.Experimental;
 import org.apache.geode.internal.protocol.protobuf.ClientProtocol;
 
 @Experimental
-public class Failure<SuccessType, ExecutionContext> implements Result<SuccessType, ExecutionContext> {
+public class Failure<SuccessType> implements Result<SuccessType> {
   private final ClientProtocol.ErrorResponse errorResponse;
-  private final ExecutionContext executionContext;
 
-  public Failure(ClientProtocol.ErrorResponse errorResponse, ExecutionContext executionContext) {
+  public Failure(ClientProtocol.ErrorResponse errorResponse) {
     this.errorResponse = errorResponse;
-    this.executionContext = executionContext;
   }
 
-  public static <T, V> Failure<T, V> of(ClientProtocol.ErrorResponse errorResponse, V context) {
-    return new Failure<>(errorResponse, context);
+  public static <T, V> Failure<T> of(ClientProtocol.ErrorResponse errorResponse) {
+    return new Failure<>(errorResponse);
   }
 
   @Override
   public <T> T map(Function<SuccessType, T> successFunction,
-                   Function<ClientProtocol.ErrorResponse, T> errorFunction) {
+      Function<ClientProtocol.ErrorResponse, T> errorFunction) {
     return errorFunction.apply(errorResponse);
   }
 
   @Override
-  public ExecutionContext getExecutionContext() {
-    return executionContext;
-  }
-
-  @Override
   public SuccessType getMessage() {
     throw new RuntimeException("This is not a Success result");
   }
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/Handshaker.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/Handshaker.java
deleted file mode 100644
index 1a5bb97..0000000
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/Handshaker.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-
-package org.apache.geode.internal.protocol;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import org.apache.logging.log4j.Logger;
-
-import org.apache.geode.cache.IncompatibleVersionException;
-import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
-import org.apache.geode.internal.logging.LogService;
-import org.apache.geode.internal.protocol.Result;
-import org.apache.geode.internal.protocol.handshaker.ClientProtocolHandshaker;
-import org.apache.geode.internal.protocol.protobuf.HandshakeAPI;
-import org.apache.geode.internal.protocol.protobuf.operations.handshaker.HandshakerRequestOperationHandler;
-
-public class Handshaker implements ClientProtocolHandshaker {
-  private static final Logger logger = LogService.getLogger();
-
-  private boolean succesfulHandshake = false;
-  private final HandshakerRequestOperationHandler handshakerRequestOperationHandler;
-
-  public Handshaker() {
-    handshakerRequestOperationHandler = new HandshakerRequestOperationHandler();
-  }
-
-  @Override
-  public void processHandshake(InputStream inputStream, OutputStream outputStream)
-      throws IOException, IncompatibleVersionException {
-    HandshakeAPI.HandshakeRequest handshakeRequest =
-        HandshakeAPI.HandshakeRequest.parseDelimitedFrom(inputStream);
-
-    // At this stage HandshakerRequestOperationHandler is not wired into the
-    // ProtobufOpsStreamProcesser.
-    // Thus passing in null serializationService and executionContext.
-    Result<HandshakeAPI.HandshakeResponse,MessageExecutionContext> result =
-        handshakerRequestOperationHandler.process(null, handshakeRequest, null);
-
-    HandshakeAPI.HandshakeResponse handshakeResponse = result.getMessage();
-    handshakeResponse.writeDelimitedTo(outputStream);
-    succesfulHandshake = handshakeResponse.getOk();
-  }
-
-  @Override
-  public boolean completed() {
-    return succesfulHandshake;
-  }
-}
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/cache/tier/sockets/MessageExecutionContext.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/MessageExecutionContext.java
similarity index 85%
rename from geode-protobuf/src/main/java/org/apache/geode/internal/cache/tier/sockets/MessageExecutionContext.java
rename to geode-protobuf/src/main/java/org/apache/geode/internal/protocol/MessageExecutionContext.java
index 5c9a5c8..f95704b 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/cache/tier/sockets/MessageExecutionContext.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/MessageExecutionContext.java
@@ -13,7 +13,7 @@
  * the License.
  */
 
-package org.apache.geode.internal.cache.tier.sockets;
+package org.apache.geode.internal.protocol;
 
 
 import org.apache.geode.annotations.Experimental;
@@ -21,7 +21,8 @@ import org.apache.geode.cache.Cache;
 import org.apache.geode.distributed.Locator;
 import org.apache.geode.distributed.internal.InternalLocator;
 import org.apache.geode.internal.exception.InvalidExecutionContextException;
-import org.apache.geode.internal.protocol.protobuf.security.processors.NoAuthenticationSecurityProcessor;
+import org.apache.geode.internal.protocol.security.processors.AuthorizationSecurityProcessor;
+import org.apache.geode.internal.protocol.security.processors.NoAuthenticationSecurityProcessor;
 import org.apache.geode.internal.protocol.security.Authenticator;
 import org.apache.geode.internal.protocol.security.NoOpAuthenticator;
 import org.apache.geode.internal.protocol.security.SecurityProcessor;
@@ -31,12 +32,12 @@ import org.apache.geode.internal.protocol.security.NoOpAuthorizer;
 
 @Experimental
 public class MessageExecutionContext {
-  private Cache cache;
-  private Locator locator;
+  private final Cache cache;
+  private final Locator locator;
   private final Authorizer authorizer;
-  private final Object authenticatedToken;
+  private Object authenticatedToken;
   private final ProtocolClientStatistics statistics;
-  private final SecurityProcessor securityProcessor;
+  private SecurityProcessor securityProcessor;
   private final Authenticator authenticator;
 
 
@@ -44,6 +45,7 @@ public class MessageExecutionContext {
       Authorizer streamAuthorizer, Object authenticatedToken, ProtocolClientStatistics statistics,
       SecurityProcessor securityProcessor) {
     this.cache = cache;
+    this.locator = null;
     this.authorizer = streamAuthorizer;
     this.authenticatedToken = authenticatedToken;
     this.statistics = statistics;
@@ -53,12 +55,12 @@ public class MessageExecutionContext {
 
   public MessageExecutionContext(InternalLocator locator, ProtocolClientStatistics statistics) {
     this.locator = locator;
+    this.cache = null;
     // set a no-op authorizer until such time as locators implement authentication
     // and authorization checks
     this.authorizer = new NoOpAuthorizer();
     this.authenticator = new NoOpAuthenticator();
     this.statistics = statistics;
-    this.authenticatedToken = new Object();
     this.securityProcessor = new NoAuthenticationSecurityProcessor();
   }
 
@@ -120,4 +122,12 @@ public class MessageExecutionContext {
   public SecurityProcessor getSecurityProcessor() {
     return securityProcessor;
   }
+
+  public void setSecurityProcessor(AuthorizationSecurityProcessor securityProcessor) {
+    this.securityProcessor = securityProcessor;
+  }
+
+  public void setAuthenticationToken(Object authenticationToken) {
+    this.authenticatedToken = authenticationToken;
+  }
 }
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/OperationContext.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/OperationContext.java
index d4ca2a0..6e2d636 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/OperationContext.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/OperationContext.java
@@ -37,11 +37,11 @@ public class OperationContext<OperationRequest, OperationResponse> {
     this.operationHandler = operationHandler;
     this.fromRequest = fromRequest;
     this.toResponse = toResponse;
-    this.toErrorResponse = OperationContext::makeErrorBuilder;
+    this.toErrorResponse = this::makeErrorBuilder;
     accessPermissionRequired = permissionRequired;
   }
 
-  public static ClientProtocol.Response.Builder makeErrorBuilder(
+  private ClientProtocol.Response.Builder makeErrorBuilder(
       ClientProtocol.ErrorResponse errorResponse) {
     return ClientProtocol.Response.newBuilder().setErrorResponse(errorResponse);
   }
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/ProtocolErrorCode.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/ProtocolErrorCode.java
index f74f613..c9813c1 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/ProtocolErrorCode.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/ProtocolErrorCode.java
@@ -22,7 +22,6 @@ public enum ProtocolErrorCode {
   UNSUPPORTED_AUTHENTICATION_MODE(1103),
   AUTHENTICATION_FAILED(1200),
   AUTHORIZATION_FAILED(1201),
-  UNAUTHORIZED_REQUEST(1202),
   LOW_MEMORY(1300),
   DATA_UNREACHABLE(1301),
   OPERATION_TIMEOUT(1302),
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/Result.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/Result.java
index 69a5f6f..6a1a3a4 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/Result.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/Result.java
@@ -20,12 +20,10 @@ import org.apache.geode.annotations.Experimental;
 import org.apache.geode.internal.protocol.protobuf.ClientProtocol;
 
 @Experimental
-public interface Result<SuccessType,ExecutionContext> {
+public interface Result<SuccessType> {
   <T> T map(Function<SuccessType, T> successFunction,
       Function<ClientProtocol.ErrorResponse, T> errorFunction);
 
-  ExecutionContext getExecutionContext();
-
   SuccessType getMessage();
 
   ClientProtocol.ErrorResponse getErrorMessage();
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/Success.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/Success.java
index 0a3378e..1c1e6f9 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/Success.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/Success.java
@@ -20,32 +20,24 @@ import org.apache.geode.annotations.Experimental;
 import org.apache.geode.internal.protocol.protobuf.ClientProtocol;
 
 @Experimental
-public class Success<SuccessType, ExecutionContext>
-    implements Result<SuccessType, ExecutionContext> {
+public class Success<SuccessType> implements Result<SuccessType> {
   private final SuccessType successResponse;
-  private final ExecutionContext executionContext;
 
-  public Success(SuccessType successResponse, ExecutionContext executionContext) {
+  public Success(SuccessType successResponse) {
     this.successResponse = successResponse;
-    this.executionContext = executionContext;
   }
 
-  public static <T,V> Success<T,V> of(T result,V context) {
-    return new Success<>(result,context);
+  public static <T> Success<T> of(T result) {
+    return new Success<>(result);
   }
 
   @Override
   public <T> T map(Function<SuccessType, T> successFunction,
-                   Function<ClientProtocol.ErrorResponse, T> errorFunction) {
+      Function<ClientProtocol.ErrorResponse, T> errorFunction) {
     return successFunction.apply(successResponse);
   }
 
   @Override
-  public ExecutionContext getExecutionContext() {
-    return executionContext;
-  }
-
-  @Override
   public SuccessType getMessage() {
     return successResponse;
   }
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/handshaker/ClientProtocolHandshaker.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/handshaker/ClientProtocolHandshaker.java
deleted file mode 100644
index da81325..0000000
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/handshaker/ClientProtocolHandshaker.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.geode.internal.protocol.handshaker;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import org.apache.geode.cache.IncompatibleVersionException;
-import org.apache.geode.internal.protocol.security.Authenticator;
-
-public interface ClientProtocolHandshaker {
-  void processHandshake(InputStream inputStream, OutputStream outputStream)
-      throws IOException, IncompatibleVersionException;
-
-  boolean completed();
-}
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/operations/OperationHandler.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/operations/OperationHandler.java
index 13ce932..286c525 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/operations/OperationHandler.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/operations/OperationHandler.java
@@ -15,7 +15,7 @@
 package org.apache.geode.internal.protocol.operations;
 
 import org.apache.geode.annotations.Experimental;
-import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
+import org.apache.geode.internal.protocol.MessageExecutionContext;
 import org.apache.geode.internal.exception.InvalidExecutionContextException;
 import org.apache.geode.internal.protocol.protobuf.ProtobufOpsProcessor;
 import org.apache.geode.internal.protocol.Result;
@@ -33,7 +33,7 @@ public interface OperationHandler<Req, Resp> {
    * Decode the message, deserialize contained values using the serialization service, do the work
    * indicated on the provided cache, and return a response.
    */
-  Result<Resp,MessageExecutionContext> process(SerializationService serializationService, Req request,
+  Result<Resp> process(SerializationService serializationService, Req request,
       MessageExecutionContext messageExecutionContext) throws InvalidExecutionContextException;
 }
 
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/ProtobufCachePipeline.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/ProtobufCachePipeline.java
similarity index 66%
rename from geode-protobuf/src/main/java/org/apache/geode/internal/protocol/ProtobufCachePipeline.java
rename to geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/ProtobufCachePipeline.java
index a7764df..44829e0 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/ProtobufCachePipeline.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/ProtobufCachePipeline.java
@@ -13,7 +13,7 @@
  * the License.
  */
 
-package org.apache.geode.internal.protocol;
+package org.apache.geode.internal.protocol.protobuf;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -21,44 +21,35 @@ import java.io.OutputStream;
 
 import org.apache.geode.annotations.Experimental;
 import org.apache.geode.cache.Cache;
-import org.apache.geode.internal.cache.tier.sockets.ClientProtocolProcessor;
-import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
-import org.apache.geode.internal.protocol.protobuf.ProtobufStreamProcessor;
-import org.apache.geode.internal.protocol.protobuf.security.processors.AuthenticationSecurityProcessor;
+import org.apache.geode.internal.cache.client.protocol.ClientProtocolProcessor;
+import org.apache.geode.internal.protocol.MessageExecutionContext;
 import org.apache.geode.internal.protocol.security.Authenticator;
 import org.apache.geode.internal.protocol.security.Authorizer;
+import org.apache.geode.internal.protocol.security.SecurityProcessor;
 import org.apache.geode.internal.protocol.statistics.ProtocolClientStatistics;
-import org.apache.geode.internal.security.SecurityService;
-import org.apache.geode.security.AuthenticationFailedException;
 
 
 @Experimental
 public final class ProtobufCachePipeline implements ClientProtocolProcessor {
   private final ProtocolClientStatistics statistics;
-  private final Cache cache;
-  private final Authorizer authorizer;
   private final ProtobufStreamProcessor streamProcessor;
-  private final Authenticator authenticator;
 
-  private MessageExecutionContext messageExecutionContext;
+  private final MessageExecutionContext messageExecutionContext;
 
   ProtobufCachePipeline(ProtobufStreamProcessor protobufStreamProcessor,
       ProtocolClientStatistics statistics, Cache cache, Authenticator authenticator,
-      Authorizer authorizer) {
+      Authorizer authorizer, SecurityProcessor securityProcessor) {
     this.streamProcessor = protobufStreamProcessor;
     this.statistics = statistics;
-    this.cache = cache;
-    this.authenticator = authenticator;
-    this.authorizer = authorizer;
     this.statistics.clientConnected();
     this.messageExecutionContext = new MessageExecutionContext(cache, authenticator, authorizer,
-        null, statistics, new AuthenticationSecurityProcessor());
+        null, statistics, securityProcessor);
   }
 
   @Override
   public void processMessage(InputStream inputStream, OutputStream outputStream)
       throws IOException {
-    messageExecutionContext = streamProcessor.receiveMessage(inputStream, outputStream, messageExecutionContext);
+    streamProcessor.receiveMessage(inputStream, outputStream, messageExecutionContext);
   }
 
   @Override
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/ProtobufLocatorPipeline.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/ProtobufLocatorPipeline.java
similarity index 88%
rename from geode-protobuf/src/main/java/org/apache/geode/internal/protocol/ProtobufLocatorPipeline.java
rename to geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/ProtobufLocatorPipeline.java
index bc0bf6a..12aab64 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/ProtobufLocatorPipeline.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/ProtobufLocatorPipeline.java
@@ -13,7 +13,7 @@
  * the License.
  */
 
-package org.apache.geode.internal.protocol;
+package org.apache.geode.internal.protocol.protobuf;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -22,9 +22,8 @@ import java.io.OutputStream;
 import org.apache.geode.annotations.Experimental;
 import org.apache.geode.cache.IncompatibleVersionException;
 import org.apache.geode.distributed.internal.InternalLocator;
-import org.apache.geode.internal.cache.tier.sockets.ClientProtocolProcessor;
-import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
-import org.apache.geode.internal.protocol.protobuf.ProtobufStreamProcessor;
+import org.apache.geode.internal.cache.client.protocol.ClientProtocolProcessor;
+import org.apache.geode.internal.protocol.MessageExecutionContext;
 import org.apache.geode.internal.protocol.statistics.ProtocolClientStatistics;
 
 @Experimental
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/ProtobufOpsProcessor.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/ProtobufOpsProcessor.java
index 59407d6..5529553 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/ProtobufOpsProcessor.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/ProtobufOpsProcessor.java
@@ -17,17 +17,18 @@ package org.apache.geode.internal.protocol.protobuf;
 import org.apache.logging.log4j.Logger;
 
 import org.apache.geode.annotations.Experimental;
-import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
+import org.apache.geode.internal.protocol.MessageExecutionContext;
 import org.apache.geode.internal.exception.InvalidExecutionContextException;
 import org.apache.geode.internal.logging.LogService;
 import org.apache.geode.internal.protocol.Failure;
 import org.apache.geode.internal.protocol.OperationContext;
 import org.apache.geode.internal.protocol.Result;
-import org.apache.geode.internal.protocol.Success;
-import org.apache.geode.internal.protocol.registry.OperationContextRegistry;
+import org.apache.geode.internal.protocol.protobuf.registry.ProtobufOperationContextRegistry;
 import org.apache.geode.internal.protocol.protobuf.utilities.ProtobufResponseUtilities;
 import org.apache.geode.internal.protocol.security.SecurityProcessor;
 import org.apache.geode.internal.serialization.SerializationService;
+import org.apache.geode.security.AuthenticationRequiredException;
+import org.apache.geode.security.NotAuthorizedException;
 
 import static org.apache.geode.internal.protocol.ProtocolErrorCode.*;
 
@@ -38,51 +39,51 @@ import static org.apache.geode.internal.protocol.ProtocolErrorCode.*;
 @Experimental
 public class ProtobufOpsProcessor {
 
-  private final OperationContextRegistry operationContextRegistry;
+  private final ProtobufOperationContextRegistry protobufOperationContextRegistry;
   private final SerializationService serializationService;
   private static final Logger logger = LogService.getLogger(ProtobufOpsProcessor.class);
 
   public ProtobufOpsProcessor(SerializationService serializationService,
-                              OperationContextRegistry operationContextRegistry) {
+      ProtobufOperationContextRegistry protobufOperationContextRegistry) {
     this.serializationService = serializationService;
-    this.operationContextRegistry = operationContextRegistry;
+    this.protobufOperationContextRegistry = protobufOperationContextRegistry;
   }
 
-  public Result<ClientProtocol.Response, MessageExecutionContext> process(
-      ClientProtocol.Request request,
+  public ClientProtocol.Response process(ClientProtocol.Request request,
       MessageExecutionContext messageExecutionContext) {
     ClientProtocol.Request.RequestAPICase requestType = request.getRequestAPICase();
     logger.debug("Processing request of type {}", requestType);
-    OperationContext operationContext = operationContextRegistry.getOperationContext(requestType);
+    OperationContext operationContext =
+        protobufOperationContextRegistry.getOperationContext(requestType);
     Result result;
 
     SecurityProcessor securityProcessor = messageExecutionContext.getSecurityProcessor();
-    if (securityProcessor.validateOperation(request, messageExecutionContext, operationContext)) {
+    try {
+      securityProcessor.validateOperation(request, messageExecutionContext, operationContext);
       result = processOperation(request, messageExecutionContext, requestType, operationContext);
-    } else {
-      logger.warn("Received unauthorized request");
-      messageExecutionContext.getStatistics().incAuthorizationViolations();
+    } catch (AuthenticationRequiredException e) {
+      logger.warn(e);
+      result = Failure
+          .of(ProtobufResponseUtilities.makeErrorResponse(AUTHENTICATION_FAILED, e.getMessage()));
+    } catch (NotAuthorizedException e) {
+      logger.warn(e);
       result = Failure.of(ProtobufResponseUtilities.makeErrorResponse(AUTHORIZATION_FAILED,
-          "User isn't authorized for this operation."), messageExecutionContext);
+          "The user is not authorized to complete this operation"));
     }
 
-    ClientProtocol.Response
-        response =
-        ((ClientProtocol.Response.Builder) result.map(operationContext.getToResponse(),
-            operationContext.getToErrorResponse())).build();
-    return Success.of(response, (MessageExecutionContext) result.getExecutionContext());
+    return ((ClientProtocol.Response.Builder) result.map(operationContext.getToResponse(),
+        operationContext.getToErrorResponse())).build();
   }
 
   private Result processOperation(ClientProtocol.Request request, MessageExecutionContext context,
-                                  ClientProtocol.Request.RequestAPICase requestType,
-                                  OperationContext operationContext) {
+      ClientProtocol.Request.RequestAPICase requestType, OperationContext operationContext) {
     try {
       return operationContext.getOperationHandler().process(serializationService,
           operationContext.getFromRequest().apply(request), context);
     } catch (InvalidExecutionContextException exception) {
       logger.error("Invalid execution context found for operation {}", requestType);
       return Failure.of(ProtobufResponseUtilities.makeErrorResponse(UNSUPPORTED_OPERATION,
-          "Invalid execution context found for operation."), context);
+          "Invalid execution context found for operation."));
     }
   }
 }
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/ProtobufProtocolService.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/ProtobufProtocolService.java
similarity index 74%
rename from geode-protobuf/src/main/java/org/apache/geode/internal/protocol/ProtobufProtocolService.java
rename to geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/ProtobufProtocolService.java
index 97570db..4d8a100 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/ProtobufProtocolService.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/ProtobufProtocolService.java
@@ -12,30 +12,25 @@
  * or implied. See the License for the specific language governing permissions and limitations under
  * the License.
  */
-package org.apache.geode.internal.protocol;
+package org.apache.geode.internal.protocol.protobuf;
 
 import org.apache.geode.StatisticsFactory;
 import org.apache.geode.cache.Cache;
 import org.apache.geode.distributed.internal.InternalLocator;
-import org.apache.geode.internal.cache.tier.sockets.ClientProtocolProcessor;
-import org.apache.geode.internal.cache.tier.sockets.ClientProtocolService;
-import org.apache.geode.internal.protocol.protobuf.ProtobufStreamProcessor;
-import org.apache.geode.internal.protocol.statistics.NoOpStatistics;
-import org.apache.geode.internal.protocol.statistics.ProtocolClientStatistics;
+import org.apache.geode.internal.cache.client.protocol.ClientProtocolProcessor;
+import org.apache.geode.internal.cache.client.protocol.ClientProtocolService;
 import org.apache.geode.internal.protocol.protobuf.statistics.ProtobufClientStatisticsImpl;
-import org.apache.geode.internal.protocol.security.AuthenticationLookupService;
 import org.apache.geode.internal.protocol.security.Authenticator;
-import org.apache.geode.internal.protocol.security.AuthorizationLookupService;
 import org.apache.geode.internal.protocol.security.Authorizer;
+import org.apache.geode.internal.protocol.security.SecurityLookupService;
+import org.apache.geode.internal.protocol.statistics.NoOpStatistics;
+import org.apache.geode.internal.protocol.statistics.ProtocolClientStatistics;
 import org.apache.geode.internal.security.SecurityService;
 
 public class ProtobufProtocolService implements ClientProtocolService {
   private volatile ProtocolClientStatistics statistics;
   private final ProtobufStreamProcessor protobufStreamProcessor = new ProtobufStreamProcessor();
-  private final AuthenticationLookupService authenticationLookupService =
-      new AuthenticationLookupService();
-  private final AuthorizationLookupService authorizationLookupService =
-      new AuthorizationLookupService();
+  private final SecurityLookupService securityLookupService = new SecurityLookupService();
 
   @Override
   public synchronized void initializeStatistics(String statisticsName, StatisticsFactory factory) {
@@ -49,11 +44,11 @@ public class ProtobufProtocolService implements ClientProtocolService {
       SecurityService securityService) {
     assert (statistics != null);
 
-    Authenticator authenticator = authenticationLookupService.getAuthenticator(securityService);
-    Authorizer authorizer = authorizationLookupService.getAuthorizer(securityService);
+    Authenticator authenticator = securityLookupService.lookupAuthenticator(securityService);
+    Authorizer authorizer = securityLookupService.lookupAuthorizer(securityService);
 
     return new ProtobufCachePipeline(protobufStreamProcessor, getStatistics(), cache, authenticator,
-        authorizer);
+        authorizer, securityLookupService.lookupProcessor(securityService));
   }
 
   /**
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/ProtobufStreamProcessor.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/ProtobufStreamProcessor.java
index 4250e93..7bc4730 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/ProtobufStreamProcessor.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/ProtobufStreamProcessor.java
@@ -22,12 +22,11 @@ import java.io.OutputStream;
 import org.apache.logging.log4j.Logger;
 
 import org.apache.geode.annotations.Experimental;
-import org.apache.geode.internal.cache.tier.sockets.ClientProtocolMessageHandler;
-import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
+import org.apache.geode.internal.protocol.ClientProtocolMessageHandler;
+import org.apache.geode.internal.protocol.MessageExecutionContext;
 import org.apache.geode.internal.logging.LogService;
-import org.apache.geode.internal.protocol.Result;
 import org.apache.geode.internal.protocol.exception.InvalidProtocolMessageException;
-import org.apache.geode.internal.protocol.registry.OperationContextRegistry;
+import org.apache.geode.internal.protocol.protobuf.registry.ProtobufOperationContextRegistry;
 import org.apache.geode.internal.protocol.protobuf.serializer.ProtobufProtocolSerializer;
 import org.apache.geode.internal.protocol.statistics.ProtocolClientStatistics;
 import org.apache.geode.internal.protocol.protobuf.utilities.ProtobufUtilities;
@@ -46,23 +45,21 @@ public class ProtobufStreamProcessor implements ClientProtocolMessageHandler {
   public ProtobufStreamProcessor() {
     protobufProtocolSerializer = new ProtobufProtocolSerializer();
     protobufOpsProcessor = new ProtobufOpsProcessor(new ProtobufSerializationService(),
-        new OperationContextRegistry());
+        new ProtobufOperationContextRegistry());
   }
 
   @Override
-  public MessageExecutionContext receiveMessage(InputStream inputStream, OutputStream outputStream,
-                                                MessageExecutionContext executionContext)
-      throws IOException {
+  public void receiveMessage(InputStream inputStream, OutputStream outputStream,
+      MessageExecutionContext executionContext) throws IOException {
     try {
-      return processOneMessage(inputStream, outputStream, executionContext);
+      processOneMessage(inputStream, outputStream, executionContext);
     } catch (InvalidProtocolMessageException e) {
       throw new IOException(e);
     }
   }
 
-  private MessageExecutionContext processOneMessage(InputStream inputStream,
-                                                    OutputStream outputStream,
-                                                    MessageExecutionContext executionContext)
+  private void processOneMessage(InputStream inputStream, OutputStream outputStream,
+      MessageExecutionContext executionContext)
       throws InvalidProtocolMessageException, IOException {
     ClientProtocol.Message message = protobufProtocolSerializer.deserialize(inputStream);
     if (message == null) {
@@ -74,13 +71,9 @@ public class ProtobufStreamProcessor implements ClientProtocolMessageHandler {
     statistics.messageReceived(message.getSerializedSize());
 
     ClientProtocol.Request request = message.getRequest();
-    Result<ClientProtocol.Response, MessageExecutionContext> result =
-        protobufOpsProcessor.process(request, executionContext);
-    ClientProtocol.Message
-        responseMessage =
-        ProtobufUtilities.createProtobufResponse(result.getMessage());
+    ClientProtocol.Response response = protobufOpsProcessor.process(request, executionContext);
+    ClientProtocol.Message responseMessage = ProtobufUtilities.createProtobufResponse(response);
     statistics.messageSent(responseMessage.getSerializedSize());
     protobufProtocolSerializer.serialize(responseMessage, outputStream);
-    return result.getExecutionContext();
   }
 }
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/GetAllRequestOperationHandler.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/GetAllRequestOperationHandler.java
index c15a44f..c91c9e1 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/GetAllRequestOperationHandler.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/GetAllRequestOperationHandler.java
@@ -25,7 +25,7 @@ import org.apache.geode.cache.CacheLoaderException;
 import org.apache.geode.cache.PartitionedRegionStorageException;
 import org.apache.geode.cache.Region;
 import org.apache.geode.cache.TimeoutException;
-import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
+import org.apache.geode.internal.protocol.MessageExecutionContext;
 import org.apache.geode.internal.exception.InvalidExecutionContextException;
 import org.apache.geode.internal.logging.LogService;
 import org.apache.geode.internal.protocol.operations.OperationHandler;
@@ -49,7 +49,7 @@ public class GetAllRequestOperationHandler
   private static final Logger logger = LogService.getLogger();
 
   @Override
-  public Result<RegionAPI.GetAllResponse,MessageExecutionContext> process(SerializationService serializationService,
+  public Result<RegionAPI.GetAllResponse> process(SerializationService serializationService,
       RegionAPI.GetAllRequest request, MessageExecutionContext messageExecutionContext)
       throws InvalidExecutionContextException {
     String regionName = request.getRegionName();
@@ -57,7 +57,7 @@ public class GetAllRequestOperationHandler
     if (region == null) {
       logger.error("Received GetAll request for non-existing region {}", regionName);
       return Failure
-          .of(ProtobufResponseUtilities.makeErrorResponse(REGION_NOT_FOUND, "Region not found"),messageExecutionContext);
+          .of(ProtobufResponseUtilities.makeErrorResponse(REGION_NOT_FOUND, "Region not found"));
     }
 
     Map<Boolean, List<Object>> resultsCollection = request.getKeyList().stream()
@@ -73,7 +73,7 @@ public class GetAllRequestOperationHandler
       responseBuilder.addFailures((BasicTypes.KeyedError) entry);
     }
 
-    return Success.of(responseBuilder.build(),messageExecutionContext);
+    return Success.of(responseBuilder.build());
   }
 
   private Object processOneMessage(SerializationService serializationService, Region region,
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/GetAvailableServersOperationHandler.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/GetAvailableServersOperationHandler.java
index ec2c917..f15e94c 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/GetAvailableServersOperationHandler.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/GetAvailableServersOperationHandler.java
@@ -21,7 +21,7 @@ import java.util.stream.Collectors;
 import org.apache.geode.annotations.Experimental;
 import org.apache.geode.distributed.internal.InternalLocator;
 import org.apache.geode.distributed.internal.ServerLocation;
-import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
+import org.apache.geode.internal.protocol.MessageExecutionContext;
 import org.apache.geode.internal.exception.InvalidExecutionContextException;
 import org.apache.geode.internal.protocol.operations.OperationHandler;
 import org.apache.geode.internal.protocol.protobuf.BasicTypes;
@@ -35,7 +35,7 @@ public class GetAvailableServersOperationHandler implements
     OperationHandler<ServerAPI.GetAvailableServersRequest, ServerAPI.GetAvailableServersResponse> {
 
   @Override
-  public Result<ServerAPI.GetAvailableServersResponse,MessageExecutionContext> process(
+  public Result<ServerAPI.GetAvailableServersResponse> process(
       SerializationService serializationService, ServerAPI.GetAvailableServersRequest request,
       MessageExecutionContext messageExecutionContext) throws InvalidExecutionContextException {
 
@@ -51,7 +51,7 @@ public class GetAvailableServersOperationHandler implements
         .collect(Collectors.toList());
     ServerAPI.GetAvailableServersResponse.Builder builder =
         ServerAPI.GetAvailableServersResponse.newBuilder().addAllServers(servers);
-    return Success.of(builder.build(),messageExecutionContext);
+    return Success.of(builder.build());
   }
 
   private BasicTypes.Server getServerProtobufMessage(ServerLocation serverLocation) {
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/GetRegionNamesRequestOperationHandler.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/GetRegionNamesRequestOperationHandler.java
index c8e6573..7e7cf71 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/GetRegionNamesRequestOperationHandler.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/GetRegionNamesRequestOperationHandler.java
@@ -18,7 +18,7 @@ import java.util.Set;
 
 import org.apache.geode.annotations.Experimental;
 import org.apache.geode.cache.Region;
-import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
+import org.apache.geode.internal.protocol.MessageExecutionContext;
 import org.apache.geode.internal.exception.InvalidExecutionContextException;
 import org.apache.geode.internal.protocol.operations.OperationHandler;
 import org.apache.geode.internal.protocol.protobuf.RegionAPI;
@@ -32,10 +32,10 @@ public class GetRegionNamesRequestOperationHandler
     implements OperationHandler<RegionAPI.GetRegionNamesRequest, RegionAPI.GetRegionNamesResponse> {
 
   @Override
-  public Result<RegionAPI.GetRegionNamesResponse,MessageExecutionContext> process(SerializationService serializationService,
+  public Result<RegionAPI.GetRegionNamesResponse> process(SerializationService serializationService,
       RegionAPI.GetRegionNamesRequest request, MessageExecutionContext messageExecutionContext)
       throws InvalidExecutionContextException {
     Set<Region<?, ?>> regions = messageExecutionContext.getCache().rootRegions();
-    return Success.of(ProtobufResponseUtilities.createGetRegionNamesResponse(regions),messageExecutionContext);
+    return Success.of(ProtobufResponseUtilities.createGetRegionNamesResponse(regions));
   }
 }
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/GetRegionRequestOperationHandler.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/GetRegionRequestOperationHandler.java
index 032d72c..f602d6a 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/GetRegionRequestOperationHandler.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/GetRegionRequestOperationHandler.java
@@ -18,7 +18,7 @@ import org.apache.logging.log4j.Logger;
 
 import org.apache.geode.annotations.Experimental;
 import org.apache.geode.cache.Region;
-import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
+import org.apache.geode.internal.protocol.MessageExecutionContext;
 import org.apache.geode.internal.exception.InvalidExecutionContextException;
 import org.apache.geode.internal.logging.LogService;
 import org.apache.geode.internal.protocol.protobuf.BasicTypes;
@@ -39,7 +39,7 @@ public class GetRegionRequestOperationHandler
   private static final Logger logger = LogService.getLogger();
 
   @Override
-  public Result<RegionAPI.GetRegionResponse,MessageExecutionContext> process(SerializationService serializationService,
+  public Result<RegionAPI.GetRegionResponse> process(SerializationService serializationService,
       RegionAPI.GetRegionRequest request, MessageExecutionContext messageExecutionContext)
       throws InvalidExecutionContextException {
     String regionName = request.getRegionName();
@@ -48,11 +48,11 @@ public class GetRegionRequestOperationHandler
     if (region == null) {
       logger.error("Received GetRegion request for non-existing region {}", regionName);
       return Failure.of(ProtobufResponseUtilities.makeErrorResponse(REGION_NOT_FOUND,
-          "No region exists for name: " + regionName),messageExecutionContext);
+          "No region exists for name: " + regionName));
     }
 
     BasicTypes.Region protoRegion = ProtobufUtilities.createRegionMessageFromRegion(region);
 
-    return Success.of(RegionAPI.GetRegionResponse.newBuilder().setRegion(protoRegion).build(),messageExecutionContext);
+    return Success.of(RegionAPI.GetRegionResponse.newBuilder().setRegion(protoRegion).build());
   }
 }
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/GetRequestOperationHandler.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/GetRequestOperationHandler.java
index 0e7c6a2..a67bdc9 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/GetRequestOperationHandler.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/GetRequestOperationHandler.java
@@ -18,7 +18,7 @@ import org.apache.logging.log4j.Logger;
 
 import org.apache.geode.annotations.Experimental;
 import org.apache.geode.cache.Region;
-import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
+import org.apache.geode.internal.protocol.MessageExecutionContext;
 import org.apache.geode.internal.exception.InvalidExecutionContextException;
 import org.apache.geode.internal.logging.LogService;
 import org.apache.geode.internal.protocol.operations.OperationHandler;
@@ -41,8 +41,7 @@ public class GetRequestOperationHandler
   private static final Logger logger = LogService.getLogger();
 
   @Override
-  public Result<RegionAPI.GetResponse, MessageExecutionContext> process(
-      SerializationService serializationService,
+  public Result<RegionAPI.GetResponse> process(SerializationService serializationService,
       RegionAPI.GetRequest request, MessageExecutionContext messageExecutionContext)
       throws InvalidExecutionContextException {
     String regionName = request.getRegionName();
@@ -50,8 +49,7 @@ public class GetRequestOperationHandler
     if (region == null) {
       logger.error("Received Get request for non-existing region {}", regionName);
       return Failure
-          .of(ProtobufResponseUtilities.makeErrorResponse(REGION_NOT_FOUND, "Region not found"),
-              messageExecutionContext);
+          .of(ProtobufResponseUtilities.makeErrorResponse(REGION_NOT_FOUND, "Region not found"));
     }
 
     try {
@@ -59,21 +57,20 @@ public class GetRequestOperationHandler
       Object resultValue = region.get(decodedKey);
 
       if (resultValue == null) {
-        return Success.of(RegionAPI.GetResponse.newBuilder().build(), messageExecutionContext);
+        return Success.of(RegionAPI.GetResponse.newBuilder().build());
       }
 
       BasicTypes.EncodedValue encodedValue =
           ProtobufUtilities.createEncodedValue(serializationService, resultValue);
-      return Success.of(RegionAPI.GetResponse.newBuilder().setResult(encodedValue).build(),
-          messageExecutionContext);
+      return Success.of(RegionAPI.GetResponse.newBuilder().setResult(encodedValue).build());
     } catch (UnsupportedEncodingTypeException ex) {
       logger.error("Received Get request with unsupported encoding: {}", ex);
       return Failure.of(ProtobufResponseUtilities.makeErrorResponse(VALUE_ENCODING_ERROR,
-          "Encoding not supported."), messageExecutionContext);
+          "Encoding not supported."));
     } catch (CodecNotRegisteredForTypeException ex) {
       logger.error("Got codec error when decoding Get request: {}", ex);
       return Failure.of(ProtobufResponseUtilities.makeErrorResponse(VALUE_ENCODING_ERROR,
-          "Codec error in protobuf deserialization."), messageExecutionContext);
+          "Codec error in protobuf deserialization."));
     }
   }
 }
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/PutAllRequestOperationHandler.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/PutAllRequestOperationHandler.java
index 54f9391..b085370 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/PutAllRequestOperationHandler.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/PutAllRequestOperationHandler.java
@@ -22,7 +22,7 @@ import org.apache.logging.log4j.Logger;
 
 import org.apache.geode.annotations.Experimental;
 import org.apache.geode.cache.Region;
-import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
+import org.apache.geode.internal.protocol.MessageExecutionContext;
 import org.apache.geode.internal.exception.InvalidExecutionContextException;
 import org.apache.geode.internal.protocol.operations.OperationHandler;
 import org.apache.geode.internal.protocol.protobuf.BasicTypes;
@@ -45,7 +45,7 @@ public class PutAllRequestOperationHandler
   private static final Logger logger = LogManager.getLogger();
 
   @Override
-  public Result<RegionAPI.PutAllResponse,MessageExecutionContext> process(SerializationService serializationService,
+  public Result<RegionAPI.PutAllResponse> process(SerializationService serializationService,
       RegionAPI.PutAllRequest putAllRequest, MessageExecutionContext messageExecutionContext)
       throws InvalidExecutionContextException {
     String regionName = putAllRequest.getRegionName();
@@ -54,14 +54,14 @@ public class PutAllRequestOperationHandler
     if (region == null) {
       logger.error("Received PutAll request for non-existing region {}", regionName);
       return Failure.of(ProtobufResponseUtilities.makeErrorResponse(REGION_NOT_FOUND,
-          "Region passed does not exist: " + regionName),messageExecutionContext);
+          "Region passed does not exist: " + regionName));
     }
 
     RegionAPI.PutAllResponse.Builder builder = RegionAPI.PutAllResponse.newBuilder()
         .addAllFailedKeys(putAllRequest.getEntryList().stream()
             .map((entry) -> singlePut(serializationService, region, entry)).filter(Objects::nonNull)
             .collect(Collectors.toList()));
-    return Success.of(builder.build(),messageExecutionContext);
+    return Success.of(builder.build());
   }
 
   private BasicTypes.KeyedError singlePut(SerializationService serializationService, Region region,
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/PutRequestOperationHandler.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/PutRequestOperationHandler.java
index 719fa85..345f829 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/PutRequestOperationHandler.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/PutRequestOperationHandler.java
@@ -18,7 +18,7 @@ import org.apache.logging.log4j.Logger;
 
 import org.apache.geode.annotations.Experimental;
 import org.apache.geode.cache.Region;
-import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
+import org.apache.geode.internal.protocol.MessageExecutionContext;
 import org.apache.geode.internal.exception.InvalidExecutionContextException;
 import org.apache.geode.internal.logging.LogService;
 import org.apache.geode.internal.protocol.operations.OperationHandler;
@@ -41,7 +41,7 @@ public class PutRequestOperationHandler
   private static final Logger logger = LogService.getLogger();
 
   @Override
-  public Result<RegionAPI.PutResponse,MessageExecutionContext> process(SerializationService serializationService,
+  public Result<RegionAPI.PutResponse> process(SerializationService serializationService,
       RegionAPI.PutRequest request, MessageExecutionContext messageExecutionContext)
       throws InvalidExecutionContextException {
     String regionName = request.getRegionName();
@@ -49,7 +49,7 @@ public class PutRequestOperationHandler
     if (region == null) {
       logger.warn("Received Put request for non-existing region: {}", regionName);
       return Failure.of(ProtobufResponseUtilities.makeErrorResponse(REGION_NOT_FOUND,
-          "Region passed by client did not exist: " + regionName),messageExecutionContext);
+          "Region passed by client did not exist: " + regionName));
     }
 
     try {
@@ -59,16 +59,16 @@ public class PutRequestOperationHandler
       Object decodedKey = ProtobufUtilities.decodeValue(serializationService, entry.getKey());
       try {
         region.put(decodedKey, decodedValue);
-        return Success.of(RegionAPI.PutResponse.newBuilder().build(),messageExecutionContext);
+        return Success.of(RegionAPI.PutResponse.newBuilder().build());
       } catch (ClassCastException ex) {
         logger.error("Received Put request with invalid key type: {}", ex);
         return Failure.of(ProtobufResponseUtilities.makeErrorResponse(CONSTRAINT_VIOLATION,
-            "invalid key or value type for region " + regionName),messageExecutionContext);
+            "invalid key or value type for region " + regionName));
       }
     } catch (UnsupportedEncodingTypeException | CodecNotRegisteredForTypeException ex) {
       logger.error("Got codec error when decoding Put request: {}", ex);
       return Failure
-          .of(ProtobufResponseUtilities.makeErrorResponse(VALUE_ENCODING_ERROR, ex.getMessage()),messageExecutionContext);
+          .of(ProtobufResponseUtilities.makeErrorResponse(VALUE_ENCODING_ERROR, ex.getMessage()));
     }
   }
 }
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/RemoveRequestOperationHandler.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/RemoveRequestOperationHandler.java
index 2d401fa..2278f78 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/RemoveRequestOperationHandler.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/RemoveRequestOperationHandler.java
@@ -19,7 +19,7 @@ import org.apache.logging.log4j.Logger;
 
 import org.apache.geode.annotations.Experimental;
 import org.apache.geode.cache.Region;
-import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
+import org.apache.geode.internal.protocol.MessageExecutionContext;
 import org.apache.geode.internal.exception.InvalidExecutionContextException;
 import org.apache.geode.internal.protocol.operations.OperationHandler;
 import org.apache.geode.internal.protocol.Failure;
@@ -40,7 +40,7 @@ public class RemoveRequestOperationHandler
   private static final Logger logger = LogManager.getLogger();
 
   @Override
-  public Result<RegionAPI.RemoveResponse,MessageExecutionContext> process(SerializationService serializationService,
+  public Result<RegionAPI.RemoveResponse> process(SerializationService serializationService,
       RegionAPI.RemoveRequest request, MessageExecutionContext messageExecutionContext)
       throws InvalidExecutionContextException {
 
@@ -49,23 +49,23 @@ public class RemoveRequestOperationHandler
     if (region == null) {
       logger.error("Received Remove request for non-existing region {}", regionName);
       return Failure
-          .of(ProtobufResponseUtilities.makeErrorResponse(REGION_NOT_FOUND, "Region not found"),messageExecutionContext);
+          .of(ProtobufResponseUtilities.makeErrorResponse(REGION_NOT_FOUND, "Region not found"));
     }
 
     try {
       Object decodedKey = ProtobufUtilities.decodeValue(serializationService, request.getKey());
       region.remove(decodedKey);
 
-      return Success.of(RegionAPI.RemoveResponse.newBuilder().build(),messageExecutionContext);
+      return Success.of(RegionAPI.RemoveResponse.newBuilder().build());
     } catch (UnsupportedEncodingTypeException ex) {
       // can be thrown by encoding or decoding.
       logger.error("Received Remove request with unsupported encoding: {}", ex);
       return Failure.of(ProtobufResponseUtilities.makeErrorResponse(VALUE_ENCODING_ERROR,
-          "Encoding not supported: " + ex.getMessage()),messageExecutionContext);
+          "Encoding not supported: " + ex.getMessage()));
     } catch (CodecNotRegisteredForTypeException ex) {
       logger.error("Got codec error when decoding Remove request: {}", ex);
       return Failure.of(ProtobufResponseUtilities.makeErrorResponse(VALUE_ENCODING_ERROR,
-          "Codec error in protobuf deserialization: " + ex.getMessage()),messageExecutionContext);
+          "Codec error in protobuf deserialization: " + ex.getMessage()));
     }
   }
 }
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/handshaker/HandshakerRequestOperationHandler.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/handshaker/HandshakerRequestOperationHandler.java
deleted file mode 100644
index 0b2e3b6..0000000
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/handshaker/HandshakerRequestOperationHandler.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.geode.internal.protocol.protobuf.operations.handshaker;
-
-import static org.apache.geode.internal.protocol.ProtocolErrorCode.UNSUPPORTED_VERSION;
-
-import org.apache.logging.log4j.Logger;
-
-import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
-import org.apache.geode.internal.logging.LogService;
-import org.apache.geode.internal.protocol.operations.OperationHandler;
-import org.apache.geode.internal.protocol.protobuf.BasicTypes;
-import org.apache.geode.internal.protocol.protobuf.HandshakeAPI;
-import org.apache.geode.internal.protocol.Result;
-import org.apache.geode.internal.protocol.Success;
-import org.apache.geode.internal.serialization.SerializationService;
-
-public class HandshakerRequestOperationHandler
-    implements OperationHandler<HandshakeAPI.HandshakeRequest, HandshakeAPI.HandshakeResponse> {
-  private static final int MAJOR_VERSION = 1;
-  private static final int MINOR_VERSION = 0;
-  private static final Logger logger =
-      LogService.getLogger(HandshakerRequestOperationHandler.class);
-
-  @Override
-  public Result<HandshakeAPI.HandshakeResponse, MessageExecutionContext> process(
-      SerializationService serializationService,
-      HandshakeAPI.HandshakeRequest request, MessageExecutionContext messageExecutionContext) {
-    HandshakeAPI.Semver version = request.getVersion();
-    if (version.getMajor() != MAJOR_VERSION || version.getMinor() < MINOR_VERSION) {
-      logger.warn("Version mismatch: incompatible version. Supported version is: " + MAJOR_VERSION
-          + "." + MINOR_VERSION);
-      return Success.of(HandshakeAPI.HandshakeResponse.newBuilder().setOk(false)
-          .setError(BasicTypes.Error.newBuilder().setErrorCode(UNSUPPORTED_VERSION.codeValue)
-              .setMessage("Version mismatch: incompatible version. Supported version is: "
-                  + MAJOR_VERSION + "." + MINOR_VERSION))
-          .build(), messageExecutionContext);
-    }
-    return Success.of(HandshakeAPI.HandshakeResponse.newBuilder().setOk(true).build(),
-        messageExecutionContext);
-  }
-}
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/security/AuthenticationRequestOperationHandler.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/security/AuthenticationRequestOperationHandler.java
index 947563f..eaaf87f 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/security/AuthenticationRequestOperationHandler.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/security/AuthenticationRequestOperationHandler.java
@@ -16,42 +16,59 @@ package org.apache.geode.internal.protocol.protobuf.operations.security;
 
 import java.util.Properties;
 
-import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+import org.apache.geode.internal.protocol.MessageExecutionContext;
 import org.apache.geode.internal.exception.InvalidExecutionContextException;
+import org.apache.geode.internal.protocol.Failure;
+import org.apache.geode.internal.protocol.ProtocolErrorCode;
 import org.apache.geode.internal.protocol.Result;
 import org.apache.geode.internal.protocol.Success;
 import org.apache.geode.internal.protocol.operations.OperationHandler;
 import org.apache.geode.internal.protocol.protobuf.AuthenticationAPI;
-import org.apache.geode.internal.protocol.protobuf.security.processors.AuthorizationSecurityProcessor;
+import org.apache.geode.internal.protocol.protobuf.BasicTypes;
+import org.apache.geode.internal.protocol.protobuf.ClientProtocol;
+import org.apache.geode.internal.protocol.protobuf.security.exception.IncompatibleAuthenticationMechanismsException;
+import org.apache.geode.internal.protocol.security.processors.AuthorizationSecurityProcessor;
 import org.apache.geode.internal.protocol.security.Authenticator;
 import org.apache.geode.internal.serialization.SerializationService;
 import org.apache.geode.security.AuthenticationFailedException;
 
 public class AuthenticationRequestOperationHandler implements
     OperationHandler<AuthenticationAPI.AuthenticationRequest, AuthenticationAPI.AuthenticationResponse> {
+  private static final Logger logger = LogManager.getLogger();
+
   @Override
-  public Result<AuthenticationAPI.AuthenticationResponse,MessageExecutionContext> process(
+  public Result<AuthenticationAPI.AuthenticationResponse> process(
       SerializationService serializationService, AuthenticationAPI.AuthenticationRequest request,
       MessageExecutionContext messageExecutionContext) throws InvalidExecutionContextException {
+
     Authenticator authenticator = messageExecutionContext.getAuthenticator();
     Properties properties = new Properties();
     properties.putAll(request.getCredentialsMap());
 
     try {
       Object authenticationToken = authenticator.authenticate(properties);
-      MessageExecutionContext
-          newMessageExecutionContext =
-          new MessageExecutionContext(messageExecutionContext.getCache(),
-              messageExecutionContext.getAuthenticator(), messageExecutionContext.getAuthorizer(),
-              authenticationToken, messageExecutionContext.getStatistics(),
-              new AuthorizationSecurityProcessor());
+      messageExecutionContext.setSecurityProcessor(new AuthorizationSecurityProcessor());
+      messageExecutionContext.setAuthenticationToken(authenticationToken);
       return Success
-          .of(AuthenticationAPI.AuthenticationResponse.newBuilder().setAuthenticated(true).build(),
-              newMessageExecutionContext);
+          .of(AuthenticationAPI.AuthenticationResponse.newBuilder().setAuthenticated(true).build());
+    } catch (IncompatibleAuthenticationMechanismsException e) {
+      return Failure.of(ClientProtocol.ErrorResponse.newBuilder().setError(
+          buildAndLogError(ProtocolErrorCode.UNSUPPORTED_AUTHENTICATION_MODE, e.getMessage(), e))
+          .build());
     } catch (AuthenticationFailedException e) {
-      return Success
-          .of(AuthenticationAPI.AuthenticationResponse.newBuilder().setAuthenticated(false)
-              .build(), messageExecutionContext);
+      return Success.of(
+          AuthenticationAPI.AuthenticationResponse.newBuilder().setAuthenticated(false).build());
     }
   }
+
+  private BasicTypes.Error buildAndLogError(ProtocolErrorCode errorCode, String message,
+      Exception ex) {
+    logger.warn(message, ex);
+
+    return BasicTypes.Error.newBuilder().setErrorCode(errorCode.codeValue).setMessage(message)
+        .build();
+  }
 }
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/registry/OperationContextRegistry.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/registry/ProtobufOperationContextRegistry.java
similarity index 97%
rename from geode-protobuf/src/main/java/org/apache/geode/internal/protocol/registry/OperationContextRegistry.java
rename to geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/registry/ProtobufOperationContextRegistry.java
index e18a81b..757dd44 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/registry/OperationContextRegistry.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/registry/ProtobufOperationContextRegistry.java
@@ -13,7 +13,7 @@
  * the License.
  */
 
-package org.apache.geode.internal.protocol.registry;
+package org.apache.geode.internal.protocol.protobuf.registry;
 
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
@@ -34,10 +34,10 @@ import org.apache.geode.internal.protocol.protobuf.operations.security.Authentic
 import org.apache.geode.security.ResourcePermission;
 
 @Experimental
-public class OperationContextRegistry {
+public class ProtobufOperationContextRegistry {
   private Map<RequestAPICase, OperationContext> operationContexts = new ConcurrentHashMap<>();
 
-  public OperationContextRegistry() {
+  public ProtobufOperationContextRegistry() {
     addContexts();
   }
 
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/InvalidConfigAuthenticator.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/InvalidConfigAuthenticator.java
index 409a075..bed24bb 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/InvalidConfigAuthenticator.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/InvalidConfigAuthenticator.java
@@ -25,6 +25,7 @@ import org.apache.geode.internal.protocol.ProtocolErrorCode;
 import org.apache.logging.log4j.Logger;
 
 import org.apache.geode.internal.logging.LogService;
+import org.apache.geode.internal.protocol.protobuf.security.exception.IncompatibleAuthenticationMechanismsException;
 import org.apache.geode.internal.protocol.security.Authenticator;
 import org.apache.geode.internal.security.SecurityService;
 import org.apache.geode.security.AuthenticationFailedException;
@@ -36,7 +37,7 @@ public class InvalidConfigAuthenticator implements Authenticator<Object, Object>
   public Object authenticate(Object object) throws AuthenticationFailedException {
     logger.warn(
         "Attempting to authenticate incoming protobuf message using legacy security implementation. This is not supported. Failing authentication.");
-    throw new AuthenticationFailedException(
+    throw new IncompatibleAuthenticationMechanismsException(
         "Attempting to authenticate incoming protobuf message using legacy security implementation. This is not supported. Failing authentication.");
   }
 }
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/ProtobufShiroAuthenticator.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/ProtobufShiroAuthenticator.java
index cdee506..fc95751 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/ProtobufShiroAuthenticator.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/ProtobufShiroAuthenticator.java
@@ -14,23 +14,14 @@
  */
 package org.apache.geode.internal.protocol.protobuf.security;
 
-import static org.apache.geode.internal.protocol.ProtocolErrorCode.AUTHENTICATION_FAILED;
+import java.util.Properties;
 
-import org.apache.geode.internal.protocol.protobuf.AuthenticationAPI;
+import org.apache.shiro.subject.Subject;
 
-import org.apache.geode.internal.protocol.protobuf.BasicTypes;
-import org.apache.geode.internal.protocol.protobuf.ClientProtocol;
 import org.apache.geode.internal.protocol.security.Authenticator;
 import org.apache.geode.internal.security.SecurityService;
 import org.apache.geode.security.AuthenticationFailedException;
 
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.Properties;
-
-import org.apache.shiro.subject.Subject;
-
 public class ProtobufShiroAuthenticator implements Authenticator<Properties, Subject> {
   private final SecurityService securityService;
 
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/ProtobufShiroAuthorizer.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/ProtobufShiroAuthorizer.java
index b078e4b..04149eb 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/ProtobufShiroAuthorizer.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/ProtobufShiroAuthorizer.java
@@ -36,8 +36,6 @@ public class ProtobufShiroAuthorizer implements Authorizer {
     try {
       securityService.authorize(permissionRequested);
       return true;
-    } catch (NotAuthorizedException ex) {
-      return false;
     } finally {
       threadState.restore();
     }
diff --git a/geode-protobuf/src/main/proto/handshake_API.proto b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/exception/IncompatibleAuthenticationMechanismsException.java
similarity index 63%
rename from geode-protobuf/src/main/proto/handshake_API.proto
rename to geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/exception/IncompatibleAuthenticationMechanismsException.java
index b11ae03..1afecb0 100644
--- a/geode-protobuf/src/main/proto/handshake_API.proto
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/exception/IncompatibleAuthenticationMechanismsException.java
@@ -1,7 +1,7 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
  * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance with the License. You may obtain a
  * copy of the License at
  *
@@ -12,28 +12,12 @@
  * or implied. See the License for the specific language governing permissions and limitations under
  * the License.
  */
+package org.apache.geode.internal.protocol.protobuf.security.exception;
 
-syntax = "proto3";
-package org.apache.geode.internal.protocol.protobuf;
+import org.apache.geode.security.AuthenticationFailedException;
 
-import "basicTypes.proto";
-
-
-enum AuthenticationMode {
-    NONE = 0;
-    SIMPLE = 1;
-}
-
-message HandshakeRequest {
-    Semver version = 1;
+public class IncompatibleAuthenticationMechanismsException extends AuthenticationFailedException {
+  public IncompatibleAuthenticationMechanismsException(String message) {
+    super(message);
+  }
 }
-
-message HandshakeResponse {
-    bool ok = 1;
-    Error error = 2; // only set if not OK.
-}
-
-message Semver{
-    int32 major = 1;
-    int32 minor = 2;
-}
\ No newline at end of file
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/processors/AuthenticationSecurityProcessor.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/processors/AuthenticationSecurityProcessor.java
index d164222..0f48c22 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/processors/AuthenticationSecurityProcessor.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/processors/AuthenticationSecurityProcessor.java
@@ -14,17 +14,21 @@
  */
 package org.apache.geode.internal.protocol.protobuf.security.processors;
 
-import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
+import org.apache.geode.internal.protocol.MessageExecutionContext;
 import org.apache.geode.internal.protocol.OperationContext;
 import org.apache.geode.internal.protocol.protobuf.AuthenticationAPI;
 import org.apache.geode.internal.protocol.protobuf.ClientProtocol;
 import org.apache.geode.internal.protocol.security.SecurityProcessor;
+import org.apache.geode.security.AuthenticationRequiredException;
 
 public class AuthenticationSecurityProcessor implements SecurityProcessor<ClientProtocol.Request> {
   @Override
-  public boolean validateOperation(ClientProtocol.Request request,
+  public void validateOperation(ClientProtocol.Request request,
       MessageExecutionContext messageExecutionContext, OperationContext operationContext) {
     Object fromRequest = operationContext.getFromRequest().apply(request);
-    return fromRequest instanceof AuthenticationAPI.AuthenticationRequest;
+    if (!(fromRequest instanceof AuthenticationAPI.AuthenticationRequest)) {
+      throw new AuthenticationRequiredException(
+          "Expecting an authentication message. Received a " + fromRequest.getClass() + " message");
+    }
   }
 }
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/security/AuthenticationLookupService.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/security/AuthenticationLookupService.java
deleted file mode 100644
index 5d3f04d..0000000
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/security/AuthenticationLookupService.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.geode.internal.protocol.security;
-
-import org.apache.geode.internal.protocol.protobuf.security.InvalidConfigAuthenticator;
-import org.apache.geode.internal.protocol.protobuf.security.ProtobufShiroAuthenticator;
-import org.apache.geode.internal.security.SecurityService;
-
-public class AuthenticationLookupService {
-  public Authenticator getAuthenticator(SecurityService securityService) {
-    if (securityService.isIntegratedSecurity()) {
-      // Simple authenticator...normal shiro
-      return new ProtobufShiroAuthenticator(securityService);
-    }
-    if (securityService.isPeerSecurityRequired() || securityService.isClientSecurityRequired()) {
-      // Failing authentication...legacy security
-      return new InvalidConfigAuthenticator();
-    } else {
-      // Noop authenticator...no security
-      return new NoOpAuthenticator();
-    }
-  }
-}
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/security/AuthorizationLookupService.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/security/AuthorizationLookupService.java
deleted file mode 100644
index ed81ea6..0000000
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/security/AuthorizationLookupService.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.geode.internal.protocol.security;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.ServiceLoader;
-
-import org.apache.geode.GemFireConfigException;
-import org.apache.geode.internal.protocol.protobuf.security.ProtobufShiroAuthorizer;
-import org.apache.geode.internal.security.SecurityService;
-
-public class AuthorizationLookupService {
-  public Authorizer getAuthorizer(SecurityService securityService) {
-    if (securityService.isIntegratedSecurity()) {
-      // Simple authenticator...normal shiro
-      return new ProtobufShiroAuthorizer(securityService);
-    }
-    if (securityService.isPeerSecurityRequired() || securityService.isClientSecurityRequired()) {
-      // Failing authentication...legacy security
-      // This should never be called.
-      return null;
-    } else {
-      // Noop authenticator...no security
-      return new NoOpAuthorizer();
-    }
-  }
-}
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/security/SecurityLookupService.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/security/SecurityLookupService.java
new file mode 100644
index 0000000..dc70ec8
--- /dev/null
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/security/SecurityLookupService.java
@@ -0,0 +1,97 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package org.apache.geode.internal.protocol.security;
+
+import org.apache.geode.internal.protocol.protobuf.security.InvalidConfigAuthenticator;
+import org.apache.geode.internal.protocol.protobuf.security.ProtobufShiroAuthenticator;
+import org.apache.geode.internal.protocol.protobuf.security.ProtobufShiroAuthorizer;
+import org.apache.geode.internal.protocol.protobuf.security.processors.AuthenticationSecurityProcessor;
+import org.apache.geode.internal.protocol.security.processors.NoAuthenticationSecurityProcessor;
+import org.apache.geode.internal.security.SecurityService;
+
+public class SecurityLookupService {
+  private final Authenticator[] authenticators = new Authenticator[3];
+  private final Authorizer[] authorizers = new Authorizer[2];
+  private final SecurityProcessor[] securityProcessors = new SecurityProcessor[2];
+
+  public SecurityLookupService() {
+    initializeAuthenticators();
+    initializeAuthortizers();
+    initializeSecurityProcessors();
+  }
+
+  private void initializeSecurityProcessors() {
+    securityProcessors[0] = new NoAuthenticationSecurityProcessor();
+    securityProcessors[1] = new AuthenticationSecurityProcessor();
+  }
+
+  private void initializeAuthenticators() {
+    authenticators[0] = new NoOpAuthenticator();
+    authenticators[1] = new InvalidConfigAuthenticator();
+  }
+
+  private void initializeAuthortizers() {
+    authorizers[0] = new NoOpAuthorizer();
+  }
+
+  public SecurityProcessor lookupProcessor(SecurityService securityService) {
+    return isSecurityEnabled(securityService) ? securityProcessors[1] : securityProcessors[0];
+  }
+
+  public Authenticator lookupAuthenticator(SecurityService securityService) {
+    if (securityService.isIntegratedSecurity()) {
+      // no need to care about thread safety, eventually there will only be one authenticator
+      if (authenticators[2] == null) {
+        authenticators[2] = new ProtobufShiroAuthenticator(securityService);
+      }
+      // Simple authenticator...normal shiro
+      return authenticators[2];
+    }
+    if (isLegacySecurity(securityService)) {
+      // Failing authentication...legacy security
+      return authenticators[1];
+    } else {
+      // Noop authenticator...no security
+      return authenticators[0];
+    }
+  }
+
+  public Authorizer lookupAuthorizer(SecurityService securityService) {
+    if (securityService.isIntegratedSecurity()) {
+      // Simple authenticator...normal shiro
+      if (authorizers[1] == null) {
+        authorizers[1] = new ProtobufShiroAuthorizer(securityService);
+      }
+      // Simple authenticator...normal shiro
+      return authorizers[1];
+    }
+    if (isLegacySecurity(securityService)) {
+      // Failing authentication...legacy security
+      // This should never be called.
+      return null;
+    } else {
+      // Noop authenticator...no security
+      return authorizers[0];
+    }
+  }
+
+  private boolean isLegacySecurity(SecurityService securityService) {
+    return securityService.isPeerSecurityRequired() || securityService.isClientSecurityRequired();
+  }
+
+  private boolean isSecurityEnabled(SecurityService securityService) {
+    return securityService.isIntegratedSecurity() || isLegacySecurity(securityService);
+  }
+}
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/security/SecurityProcessor.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/security/SecurityProcessor.java
index 40d5e9e..a60cd73 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/security/SecurityProcessor.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/security/SecurityProcessor.java
@@ -14,10 +14,13 @@
  */
 package org.apache.geode.internal.protocol.security;
 
-import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
+import org.apache.geode.internal.protocol.MessageExecutionContext;
 import org.apache.geode.internal.protocol.OperationContext;
 
 public interface SecurityProcessor<RequestMessage> {
-  boolean validateOperation(RequestMessage request, MessageExecutionContext messageExecutionContext,
+  /**
+   * This method will validate an Operation. In the case of a failure, it will throw an exception.
+   */
+  void validateOperation(RequestMessage request, MessageExecutionContext messageExecutionContext,
       OperationContext operationContext);
 }
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/processors/AuthorizationSecurityProcessor.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/security/processors/AuthorizationSecurityProcessor.java
similarity index 70%
rename from geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/processors/AuthorizationSecurityProcessor.java
rename to geode-protobuf/src/main/java/org/apache/geode/internal/protocol/security/processors/AuthorizationSecurityProcessor.java
index 7664e8a..59d0084 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/processors/AuthorizationSecurityProcessor.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/security/processors/AuthorizationSecurityProcessor.java
@@ -12,18 +12,17 @@
  * or implied. See the License for the specific language governing permissions and limitations under
  * the License.
  */
-package org.apache.geode.internal.protocol.protobuf.security.processors;
+package org.apache.geode.internal.protocol.security.processors;
 
-import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
+import org.apache.geode.internal.protocol.MessageExecutionContext;
 import org.apache.geode.internal.protocol.OperationContext;
-import org.apache.geode.internal.protocol.protobuf.ClientProtocol;
 import org.apache.geode.internal.protocol.security.SecurityProcessor;
 
-public class AuthorizationSecurityProcessor implements SecurityProcessor<ClientProtocol.Request> {
+public class AuthorizationSecurityProcessor implements SecurityProcessor<Object> {
   @Override
-  public boolean validateOperation(ClientProtocol.Request request,
-      MessageExecutionContext messageExecutionContext, OperationContext operationContext) {
-    return messageExecutionContext.getAuthorizer().authorize(
+  public void validateOperation(Object request, MessageExecutionContext messageExecutionContext,
+      OperationContext operationContext) {
+    messageExecutionContext.getAuthorizer().authorize(
         messageExecutionContext.getAuthenticationToken(),
         operationContext.getAccessPermissionRequired());
   }
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/processors/NoAuthenticationSecurityProcessor.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/security/processors/NoAuthenticationSecurityProcessor.java
similarity index 65%
rename from geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/processors/NoAuthenticationSecurityProcessor.java
rename to geode-protobuf/src/main/java/org/apache/geode/internal/protocol/security/processors/NoAuthenticationSecurityProcessor.java
index d603b1a..4ed23f5 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/processors/NoAuthenticationSecurityProcessor.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/security/processors/NoAuthenticationSecurityProcessor.java
@@ -12,18 +12,17 @@
  * or implied. See the License for the specific language governing permissions and limitations under
  * the License.
  */
-package org.apache.geode.internal.protocol.protobuf.security.processors;
+package org.apache.geode.internal.protocol.security.processors;
 
-import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
+import org.apache.geode.internal.protocol.MessageExecutionContext;
 import org.apache.geode.internal.protocol.OperationContext;
-import org.apache.geode.internal.protocol.protobuf.ClientProtocol;
 import org.apache.geode.internal.protocol.security.SecurityProcessor;
 
-public class NoAuthenticationSecurityProcessor
-    implements SecurityProcessor<ClientProtocol.Request> {
+public class NoAuthenticationSecurityProcessor implements SecurityProcessor<Object> {
+
   @Override
-  public boolean validateOperation(ClientProtocol.Request request,
-      MessageExecutionContext messageExecutionContext, OperationContext operationContext) {
-    return true;
+  public void validateOperation(Object request, MessageExecutionContext messageExecutionContext,
+      OperationContext operationContext) {
+    // A truly "no-op" operation :)
   }
 }
diff --git a/geode-protobuf/src/main/resources/META-INF/services/org.apache.geode.internal.cache.client.protocol.ClientProtocolService b/geode-protobuf/src/main/resources/META-INF/services/org.apache.geode.internal.cache.client.protocol.ClientProtocolService
new file mode 100644
index 0000000..2db0521
--- /dev/null
+++ b/geode-protobuf/src/main/resources/META-INF/services/org.apache.geode.internal.cache.client.protocol.ClientProtocolService
@@ -0,0 +1 @@
+org.apache.geode.internal.protocol.protobuf.ProtobufProtocolService
\ No newline at end of file
diff --git a/geode-protobuf/src/main/resources/META-INF/services/org.apache.geode.internal.cache.tier.sockets.ClientProtocolService b/geode-protobuf/src/main/resources/META-INF/services/org.apache.geode.internal.cache.tier.sockets.ClientProtocolService
deleted file mode 100644
index 207426a..0000000
--- a/geode-protobuf/src/main/resources/META-INF/services/org.apache.geode.internal.cache.tier.sockets.ClientProtocolService
+++ /dev/null
@@ -1 +0,0 @@
-org.apache.geode.internal.protocol.ProtobufProtocolService
\ No newline at end of file
diff --git a/geode-protobuf/src/test/java/org/apache/geode/internal/cache/tier/sockets/GenericProtocolServerConnectionTest.java b/geode-protobuf/src/test/java/org/apache/geode/internal/cache/tier/sockets/GenericProtocolServerConnectionTest.java
index 8f16935..1414826 100644
--- a/geode-protobuf/src/test/java/org/apache/geode/internal/cache/tier/sockets/GenericProtocolServerConnectionTest.java
+++ b/geode-protobuf/src/test/java/org/apache/geode/internal/cache/tier/sockets/GenericProtocolServerConnectionTest.java
@@ -28,8 +28,6 @@ import java.net.InetSocketAddress;
 import java.net.Socket;
 import java.net.UnknownHostException;
 
-import org.apache.geode.distributed.internal.SecurityConfig;
-import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 import org.mockito.ArgumentCaptor;
@@ -38,6 +36,7 @@ import org.mockito.Mockito;
 import org.apache.geode.cache.IncompatibleVersionException;
 import org.apache.geode.internal.Assert;
 import org.apache.geode.internal.cache.InternalCache;
+import org.apache.geode.internal.cache.client.protocol.ClientProtocolProcessor;
 import org.apache.geode.internal.cache.tier.CachedRegionHelper;
 import org.apache.geode.internal.cache.tier.CommunicationMode;
 import org.apache.geode.internal.security.SecurityService;
diff --git a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/AuthenticationIntegrationTest.java b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/AuthenticationIntegrationTest.java
index 124abbb..dabfa4c 100644
--- a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/AuthenticationIntegrationTest.java
+++ b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/AuthenticationIntegrationTest.java
@@ -14,13 +14,11 @@
  */
 package org.apache.geode.internal.protocol;
 
-import static junit.framework.TestCase.fail;
 import static org.apache.geode.internal.protocol.ProtocolErrorCode.AUTHENTICATION_FAILED;
+import static org.apache.geode.internal.protocol.ProtocolErrorCode.UNSUPPORTED_AUTHENTICATION_MODE;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.Mockito.mock;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -286,7 +284,7 @@ public class AuthenticationIntegrationTest {
     ClientProtocol.Message errorResponse = protobufProtocolSerializer.deserialize(inputStream);
     assertEquals(ClientProtocol.Response.ResponseAPICase.ERRORRESPONSE,
         errorResponse.getResponse().getResponseAPICase());
-    assertEquals(AUTHENTICATION_FAILED.codeValue,
+    assertEquals(UNSUPPORTED_AUTHENTICATION_MODE.codeValue,
         errorResponse.getResponse().getErrorResponse().getError().getErrorCode());
   }
 
@@ -305,7 +303,7 @@ public class AuthenticationIntegrationTest {
     ClientProtocol.Message errorResponse = protobufProtocolSerializer.deserialize(inputStream);
     assertEquals(ClientProtocol.Response.ResponseAPICase.ERRORRESPONSE,
         errorResponse.getResponse().getResponseAPICase());
-    assertEquals(AUTHENTICATION_FAILED.codeValue,
+    assertEquals(UNSUPPORTED_AUTHENTICATION_MODE.codeValue,
         errorResponse.getResponse().getErrorResponse().getError().getErrorCode());
   }
 
diff --git a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufTestExecutionContext.java b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/ProtobufTestExecutionContext.java
similarity index 66%
rename from geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufTestExecutionContext.java
rename to geode-protobuf/src/test/java/org/apache/geode/internal/protocol/ProtobufTestExecutionContext.java
index 1781865..fc7a081 100644
--- a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufTestExecutionContext.java
+++ b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/ProtobufTestExecutionContext.java
@@ -12,18 +12,22 @@
  * or implied. See the License for the specific language governing permissions and limitations under
  * the License.
  */
-package org.apache.geode.internal.protocol.protobuf;
+package org.apache.geode.internal.protocol;
 
 import org.apache.geode.cache.Cache;
-import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
-import org.apache.geode.internal.protocol.protobuf.security.processors.NoAuthenticationSecurityProcessor;
+import org.apache.geode.distributed.internal.InternalLocator;
 import org.apache.geode.internal.protocol.security.NoOpAuthenticator;
 import org.apache.geode.internal.protocol.security.NoOpAuthorizer;
+import org.apache.geode.internal.protocol.security.processors.NoAuthenticationSecurityProcessor;
 import org.apache.geode.internal.protocol.statistics.NoOpStatistics;
 
 public class ProtobufTestExecutionContext {
-  public static MessageExecutionContext getNoAuthExecutionContext(Cache cache) {
-    return new MessageExecutionContext(cache, new NoOpAuthenticator(), new NoOpAuthorizer(), new Object(),
-        new NoOpStatistics(), new NoAuthenticationSecurityProcessor());
+  public static MessageExecutionContext getNoAuthCacheExecutionContext(Cache cache) {
+    return new MessageExecutionContext(cache, new NoOpAuthenticator(), new NoOpAuthorizer(),
+        new Object(), new NoOpStatistics(), new NoAuthenticationSecurityProcessor());
+  }
+
+  public static MessageExecutionContext getLocatorExecutionContext(InternalLocator locator) {
+    return new MessageExecutionContext(locator, new NoOpStatistics());
   }
 }
diff --git a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/HandshakerTest.java b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/HandshakerTest.java
deleted file mode 100644
index 10bfeaf..0000000
--- a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/HandshakerTest.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-
-package org.apache.geode.internal.protocol.protobuf;
-
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.Map;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import org.apache.geode.internal.protocol.Handshaker;
-import org.apache.geode.internal.protocol.security.Authenticator;
-import org.apache.geode.security.AuthenticationFailedException;
-import org.apache.geode.test.junit.categories.UnitTest;
-
-@Category(UnitTest.class)
-public class HandshakerTest {
-
-  private Map<String, Class<? extends Authenticator>> authenticatorMap;
-  private Handshaker handshaker;
-
-  private static class AuthenticatorMock implements Authenticator {
-
-
-    @Override
-    public Object authenticate(Object o) throws AuthenticationFailedException {
-      return null;
-    }
-  }
-
-  private static class SimpleMock extends AuthenticatorMock {
-  }
-
-  private static class NoopMock extends AuthenticatorMock {
-  }
-
-  @Before
-  public void setUp() {
-    handshaker = new Handshaker();
-    assertFalse(handshaker.completed());
-  }
-
-  @Test
-  public void version1_0IsSupported() throws Exception {
-    HandshakeAPI.HandshakeRequest handshakeRequest = HandshakeAPI.HandshakeRequest.newBuilder()
-        .setVersion(HandshakeAPI.Semver.newBuilder().setMajor(1).setMinor(1)).build();
-
-    ByteArrayInputStream byteArrayInputStream =
-        ProtobufTestUtilities.messageToByteArrayInputStream(handshakeRequest);
-
-    ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
-
-    handshaker.processHandshake(byteArrayInputStream, byteArrayOutputStream);
-    // assertTrue(actualAuthenticator instanceof NoopMock);
-
-    assertTrue(handshaker.completed());
-  }
-
-  @Test
-  public void version2NotSupported() throws Exception {
-    HandshakeAPI.HandshakeRequest handshakeRequest = HandshakeAPI.HandshakeRequest.newBuilder()
-        .setVersion(HandshakeAPI.Semver.newBuilder().setMajor(2).setMinor(0))
-        .build();
-
-    ByteArrayInputStream byteArrayInputStream =
-        ProtobufTestUtilities.messageToByteArrayInputStream(handshakeRequest);
-
-    ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
-
-    handshaker.processHandshake(byteArrayInputStream, byteArrayOutputStream);
-  }
-
-  @Test
-  public void bogusAuthenticationMode() throws Exception {
-    HandshakeAPI.HandshakeRequest handshakeRequest = HandshakeAPI.HandshakeRequest.newBuilder()
-        .setVersion(HandshakeAPI.Semver.newBuilder().setMajor(1).setMinor(0))
-        .build();
-
-    ByteArrayInputStream byteArrayInputStream =
-        ProtobufTestUtilities.messageToByteArrayInputStream(handshakeRequest);
-
-    ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
-
-    handshaker.processHandshake(byteArrayInputStream, byteArrayOutputStream);
-  }
-
-  @Test
-  public void simpleIsSupported() throws Exception {
-    HandshakeAPI.HandshakeRequest handshakeRequest = HandshakeAPI.HandshakeRequest.newBuilder()
-        .setVersion(HandshakeAPI.Semver.newBuilder().setMajor(1).setMinor(0))
-        .build();
-
-    ByteArrayInputStream byteArrayInputStream =
-        ProtobufTestUtilities.messageToByteArrayInputStream(handshakeRequest);
-
-    ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
-
-    handshaker.processHandshake(byteArrayInputStream, byteArrayOutputStream);
-    // assertTrue(actualAuthenticator instanceof SimpleMock);
-
-    assertTrue(handshaker.completed());
-  }
-}
diff --git a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/ProtobufProtocolServiceJUnitTest.java b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufProtocolServiceJUnitTest.java
similarity index 92%
rename from geode-protobuf/src/test/java/org/apache/geode/internal/protocol/ProtobufProtocolServiceJUnitTest.java
rename to geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufProtocolServiceJUnitTest.java
index 91e133d..52b78d0 100644
--- a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/ProtobufProtocolServiceJUnitTest.java
+++ b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufProtocolServiceJUnitTest.java
@@ -12,13 +12,14 @@
  * or implied. See the License for the specific language governing permissions and limitations under
  * the License.
  */
-package org.apache.geode.internal.protocol;
+package org.apache.geode.internal.protocol.protobuf;
 
 import static org.junit.Assert.*;
 
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
+import org.apache.geode.internal.protocol.protobuf.ProtobufProtocolService;
 import org.apache.geode.internal.protocol.statistics.ProtocolClientStatistics;
 import org.apache.geode.internal.statistics.DummyStatisticsFactory;
 import org.apache.geode.test.junit.categories.UnitTest;
diff --git a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufStreamProcessorTest.java b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufStreamProcessorTest.java
index e4be893..d56de00 100644
--- a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufStreamProcessorTest.java
+++ b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufStreamProcessorTest.java
@@ -15,11 +15,7 @@
 package org.apache.geode.internal.protocol.protobuf;
 
 import org.apache.geode.internal.cache.InternalCache;
-import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
-import org.apache.geode.internal.protocol.protobuf.security.processors.NoAuthenticationSecurityProcessor;
-import org.apache.geode.internal.protocol.security.NoOpAuthenticator;
-import org.apache.geode.internal.protocol.security.NoOpAuthorizer;
-import org.apache.geode.internal.protocol.statistics.NoOpStatistics;
+import org.apache.geode.internal.protocol.ProtobufTestExecutionContext;
 import org.apache.geode.test.junit.categories.UnitTest;
 
 import org.junit.Test;
@@ -42,8 +38,7 @@ public class ProtobufStreamProcessorTest {
 
     ProtobufStreamProcessor protobufStreamProcessor = new ProtobufStreamProcessor();
     InternalCache mockInternalCache = mock(InternalCache.class);
-    protobufStreamProcessor.receiveMessage(inputStream, outputStream, new MessageExecutionContext(
-        mockInternalCache, new NoOpAuthenticator(), new NoOpAuthorizer(), new Object(),
-        new NoOpStatistics(), new NoAuthenticationSecurityProcessor()));
+    protobufStreamProcessor.receiveMessage(inputStream, outputStream,
+        ProtobufTestExecutionContext.getNoAuthCacheExecutionContext(mockInternalCache));
   }
 }
diff --git a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufTestUtilities.java b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufTestUtilities.java
deleted file mode 100644
index 9a767fd..0000000
--- a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufTestUtilities.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- */
-package org.apache.geode.internal.protocol.protobuf;
-
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import com.google.protobuf.GeneratedMessageV3;
-
-public class ProtobufTestUtilities {
-  public static ByteArrayInputStream messageToByteArrayInputStream(GeneratedMessageV3 message)
-      throws IOException {
-    ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
-    message.writeDelimitedTo(byteArrayOutputStream);
-    return new ByteArrayInputStream(byteArrayOutputStream.toByteArray());
-  }
-
-
-  public static ClientProtocol.Request createProtobufRequestWithGetRegionNamesRequest(
-      RegionAPI.GetRegionNamesRequest getRegionNamesRequest) {
-    return ClientProtocol.Request.newBuilder().setGetRegionNamesRequest(getRegionNamesRequest)
-        .build();
-  }
-
-  public static void verifyHandshake(InputStream inputStream, OutputStream outputStream,
-      HandshakeAPI.AuthenticationMode authenticationMode) throws IOException {
-    buildHandshakeRequest(authenticationMode).writeDelimitedTo(outputStream);
-
-    HandshakeAPI.HandshakeResponse handshakeResponse =
-        HandshakeAPI.HandshakeResponse.parseDelimitedFrom(inputStream);
-
-    assertTrue(handshakeResponse.getOk());
-    assertFalse(handshakeResponse.hasError());
-  }
-
-  public static HandshakeAPI.HandshakeRequest buildHandshakeRequest(
-      HandshakeAPI.AuthenticationMode authenticationMode) {
-    return HandshakeAPI.HandshakeRequest.newBuilder()
-        .setVersion(HandshakeAPI.Semver.newBuilder().setMajor(1).setMinor(0))
-        .build();
-  }
-}
diff --git a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/GetAllRequestOperationHandlerJUnitTest.java b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/GetAllRequestOperationHandlerJUnitTest.java
index 40b8a7c..bcd98c3 100644
--- a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/GetAllRequestOperationHandlerJUnitTest.java
+++ b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/GetAllRequestOperationHandlerJUnitTest.java
@@ -33,10 +33,9 @@ import org.junit.experimental.categories.Category;
 
 import org.apache.geode.cache.CacheLoaderException;
 import org.apache.geode.cache.Region;
-import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
 import org.apache.geode.internal.exception.InvalidExecutionContextException;
 import org.apache.geode.internal.protocol.protobuf.BasicTypes;
-import org.apache.geode.internal.protocol.protobuf.ProtobufTestExecutionContext;
+import org.apache.geode.internal.protocol.ProtobufTestExecutionContext;
 import org.apache.geode.internal.protocol.protobuf.RegionAPI;
 import org.apache.geode.internal.protocol.Result;
 import org.apache.geode.internal.protocol.Success;
@@ -77,9 +76,9 @@ public class GetAllRequestOperationHandlerJUnitTest extends OperationHandlerJUni
 
   @Test
   public void processReturnsExpectedValuesForValidKeys() throws Exception {
-    Result<RegionAPI.GetAllResponse,MessageExecutionContext> result =
+    Result<RegionAPI.GetAllResponse> result =
         operationHandler.process(serializationServiceStub, generateTestRequest(true, false),
-            ProtobufTestExecutionContext.getNoAuthExecutionContext(cacheStub));
+            ProtobufTestExecutionContext.getNoAuthCacheExecutionContext(cacheStub));
 
     assertTrue(result instanceof Success);
 
@@ -98,9 +97,9 @@ public class GetAllRequestOperationHandlerJUnitTest extends OperationHandlerJUni
   @Test
   public void processReturnsNoEntriesForNoKeysRequested() throws UnsupportedEncodingTypeException,
       CodecNotRegisteredForTypeException, InvalidExecutionContextException {
-    Result<RegionAPI.GetAllResponse,MessageExecutionContext> result =
+    Result<RegionAPI.GetAllResponse> result =
         operationHandler.process(serializationServiceStub, generateTestRequest(false, false),
-            ProtobufTestExecutionContext.getNoAuthExecutionContext(cacheStub));
+            ProtobufTestExecutionContext.getNoAuthCacheExecutionContext(cacheStub));
 
     assertTrue(result instanceof Success);
 
@@ -116,8 +115,8 @@ public class GetAllRequestOperationHandlerJUnitTest extends OperationHandlerJUni
         NO_VALUE_PRESENT_FOR_THIS_KEY));
     RegionAPI.GetAllRequest getAllRequest =
         ProtobufRequestUtilities.createGetAllRequest(TEST_REGION, testKeys);
-    Result<RegionAPI.GetAllResponse,MessageExecutionContext> result = operationHandler.process(serializationServiceStub,
-        getAllRequest, ProtobufTestExecutionContext.getNoAuthExecutionContext(cacheStub));
+    Result<RegionAPI.GetAllResponse> result = operationHandler.process(serializationServiceStub,
+        getAllRequest, ProtobufTestExecutionContext.getNoAuthCacheExecutionContext(cacheStub));
 
     assertTrue(result instanceof Success);
     RegionAPI.GetAllResponse message = result.getMessage();
@@ -131,9 +130,9 @@ public class GetAllRequestOperationHandlerJUnitTest extends OperationHandlerJUni
   @Test
   public void multipleKeysWhereOneThrows() throws UnsupportedEncodingTypeException,
       CodecNotRegisteredForTypeException, InvalidExecutionContextException {
-    Result<RegionAPI.GetAllResponse,MessageExecutionContext> result =
+    Result<RegionAPI.GetAllResponse> result =
         operationHandler.process(serializationServiceStub, generateTestRequest(true, true),
-            ProtobufTestExecutionContext.getNoAuthExecutionContext(cacheStub));
+            ProtobufTestExecutionContext.getNoAuthCacheExecutionContext(cacheStub));
 
     assertTrue(result instanceof Success);
 
diff --git a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/GetAvailableServersOperationHandlerJUnitTest.java b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/GetAvailableServersOperationHandlerJUnitTest.java
index 418191d..6e26fda 100644
--- a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/GetAvailableServersOperationHandlerJUnitTest.java
+++ b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/GetAvailableServersOperationHandlerJUnitTest.java
@@ -19,7 +19,8 @@ import org.apache.geode.distributed.internal.LocatorLoadSnapshot;
 import org.apache.geode.distributed.internal.ServerLocation;
 import org.apache.geode.distributed.internal.ServerLocator;
 import org.apache.geode.internal.exception.InvalidExecutionContextException;
-import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
+import org.apache.geode.internal.protocol.MessageExecutionContext;
+import org.apache.geode.internal.protocol.ProtobufTestExecutionContext;
 import org.apache.geode.internal.protocol.protobuf.BasicTypes;
 import org.apache.geode.internal.protocol.Result;
 import org.apache.geode.internal.protocol.protobuf.ServerAPI;
@@ -28,6 +29,7 @@ import org.apache.geode.internal.protocol.Success;
 import org.apache.geode.internal.protocol.statistics.NoOpStatistics;
 import org.apache.geode.internal.protocol.protobuf.utilities.ProtobufRequestUtilities;
 import org.apache.geode.test.junit.categories.UnitTest;
+
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -61,7 +63,6 @@ public class GetAvailableServersOperationHandlerJUnitTest extends OperationHandl
     ServerLocator serverLocatorAdviseeMock = mock(ServerLocator.class);
     locatorLoadSnapshot = mock(LocatorLoadSnapshot.class);
 
-
     when(internalLocatorMock.getServerLocatorAdvisee()).thenReturn(serverLocatorAdviseeMock);
     when(serverLocatorAdviseeMock.getLoadSnapshot()).thenReturn(locatorLoadSnapshot);
   }
@@ -75,9 +76,7 @@ public class GetAvailableServersOperationHandlerJUnitTest extends OperationHandl
 
     ServerAPI.GetAvailableServersRequest getAvailableServersRequest =
         ProtobufRequestUtilities.createGetAvailableServersRequest();
-    Result operationHandlerResult =
-        operationHandler.process(serializationServiceStub, getAvailableServersRequest,
-            new MessageExecutionContext(internalLocatorMock, new NoOpStatistics()));
+    Result operationHandlerResult = getOperationHandlerResult(getAvailableServersRequest);
     assertTrue(operationHandlerResult instanceof Success);
     ValidateGetAvailableServersResponse(
         (GetAvailableServersResponse) operationHandlerResult.getMessage());
@@ -90,15 +89,20 @@ public class GetAvailableServersOperationHandlerJUnitTest extends OperationHandl
 
     ServerAPI.GetAvailableServersRequest getAvailableServersRequest =
         ProtobufRequestUtilities.createGetAvailableServersRequest();
-    Result operationHandlerResult =
-        operationHandler.process(serializationServiceStub, getAvailableServersRequest,
-            new MessageExecutionContext(internalLocatorMock, new NoOpStatistics()));
+    Result operationHandlerResult = getOperationHandlerResult(getAvailableServersRequest);
     assertTrue(operationHandlerResult instanceof Success);
     GetAvailableServersResponse availableServersResponse =
         (GetAvailableServersResponse) operationHandlerResult.getMessage();
     assertEquals(0, availableServersResponse.getServersCount());
   }
 
+  private Result getOperationHandlerResult(
+      ServerAPI.GetAvailableServersRequest getAvailableServersRequest)
+      throws InvalidExecutionContextException {
+    return operationHandler.process(serializationServiceStub, getAvailableServersRequest,
+        ProtobufTestExecutionContext.getLocatorExecutionContext(internalLocatorMock));
+  }
+
   private void ValidateGetAvailableServersResponse(
       GetAvailableServersResponse getAvailableServersResponse) {
     assertEquals(2, getAvailableServersResponse.getServersCount());
diff --git a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/GetRegionNamesRequestOperationHandlerJUnitTest.java b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/GetRegionNamesRequestOperationHandlerJUnitTest.java
index ba42f63..5e09ec6 100644
--- a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/GetRegionNamesRequestOperationHandlerJUnitTest.java
+++ b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/GetRegionNamesRequestOperationHandlerJUnitTest.java
@@ -14,10 +14,12 @@
  */
 package org.apache.geode.internal.protocol.protobuf.operations;
 
-import static org.apache.geode.internal.protocol.protobuf.ProtobufTestExecutionContext.getNoAuthExecutionContext;
+import static org.apache.geode.internal.Assert.assertTrue;
+import static org.apache.geode.internal.protocol.ProtobufTestExecutionContext.getNoAuthCacheExecutionContext;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
+import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashSet;
@@ -29,7 +31,6 @@ import org.junit.experimental.categories.Category;
 
 import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.Region;
-import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
 import org.apache.geode.internal.exception.InvalidExecutionContextException;
 import org.apache.geode.internal.protocol.protobuf.RegionAPI;
 import org.apache.geode.internal.protocol.Result;
@@ -64,9 +65,9 @@ public class GetRegionNamesRequestOperationHandlerJUnitTest extends OperationHan
   @Test
   public void processReturnsCacheRegions() throws UnsupportedEncodingTypeException,
       CodecNotRegisteredForTypeException, InvalidExecutionContextException {
-    Result<RegionAPI.GetRegionNamesResponse,MessageExecutionContext> result = operationHandler.process(
+    Result<RegionAPI.GetRegionNamesResponse> result = operationHandler.process(
         serializationServiceStub, ProtobufRequestUtilities.createGetRegionNamesRequest(),
-        getNoAuthExecutionContext(cacheStub));
+        getNoAuthCacheExecutionContext(cacheStub));
     Assert.assertTrue(result instanceof Success);
 
     RegionAPI.GetRegionNamesResponse getRegionsResponse = result.getMessage();
@@ -77,10 +78,15 @@ public class GetRegionNamesRequestOperationHandlerJUnitTest extends OperationHan
     String name2 = getRegionsResponse.getRegions(1);
     String name3 = getRegionsResponse.getRegions(2);
     Assert.assertTrue("The same region was returned multiple times",
-        name1 != name2 && name1 != name3 && name2 != name3);
-    Assert.assertTrue(name1 == TEST_REGION1 || name1 == TEST_REGION2 || name1 == TEST_REGION3);
-    Assert.assertTrue(name2 == TEST_REGION1 || name2 == TEST_REGION2 || name2 == TEST_REGION3);
-    Assert.assertTrue(name3 == TEST_REGION1 || name3 == TEST_REGION2 || name3 == TEST_REGION3);
+        !name1.equals(name2) && !name1.equals(name3) && !name2.equals(name3));
+    ArrayList arrayList = new ArrayList();
+    arrayList.add(TEST_REGION1);
+    arrayList.add(TEST_REGION2);
+    arrayList.add(TEST_REGION3);
+
+    assertTrue(arrayList.contains(name1));
+    assertTrue(arrayList.contains(name2));
+    assertTrue(arrayList.contains(name3));
   }
 
   @Test
@@ -88,9 +94,9 @@ public class GetRegionNamesRequestOperationHandlerJUnitTest extends OperationHan
     Cache emptyCache = mock(Cache.class);;
     when(emptyCache.rootRegions())
         .thenReturn(Collections.unmodifiableSet(new HashSet<Region<String, String>>()));
-    Result<RegionAPI.GetRegionNamesResponse,MessageExecutionContext> result = operationHandler.process(
+    Result<RegionAPI.GetRegionNamesResponse> result = operationHandler.process(
         serializationServiceStub, ProtobufRequestUtilities.createGetRegionNamesRequest(),
-        getNoAuthExecutionContext(emptyCache));
+        getNoAuthCacheExecutionContext(emptyCache));
     Assert.assertTrue(result instanceof Success);
 
     RegionAPI.GetRegionNamesResponse getRegionsResponse = result.getMessage();
diff --git a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/GetRegionRequestOperationHandlerJUnitTest.java b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/GetRegionRequestOperationHandlerJUnitTest.java
index f2aebb5..6775f06 100644
--- a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/GetRegionRequestOperationHandlerJUnitTest.java
+++ b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/GetRegionRequestOperationHandlerJUnitTest.java
@@ -14,7 +14,7 @@
  */
 package org.apache.geode.internal.protocol.protobuf.operations;
 
-import static org.apache.geode.internal.protocol.protobuf.ProtobufTestExecutionContext.getNoAuthExecutionContext;
+import static org.apache.geode.internal.protocol.ProtobufTestExecutionContext.getNoAuthCacheExecutionContext;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
@@ -31,7 +31,6 @@ import org.apache.geode.cache.DataPolicy;
 import org.apache.geode.cache.Region;
 import org.apache.geode.cache.RegionAttributes;
 import org.apache.geode.cache.Scope;
-import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
 import org.apache.geode.internal.protocol.MessageUtil;
 import org.apache.geode.internal.protocol.protobuf.BasicTypes;
 import org.apache.geode.internal.protocol.protobuf.ClientProtocol;
@@ -70,8 +69,8 @@ public class GetRegionRequestOperationHandlerJUnitTest extends OperationHandlerJ
     when(regionAttributesStub.getScope()).thenReturn(Scope.DISTRIBUTED_ACK);
 
 
-    Result<RegionAPI.GetRegionResponse,MessageExecutionContext> result = operationHandler.process(serializationServiceStub,
-        MessageUtil.makeGetRegionRequest(TEST_REGION1), getNoAuthExecutionContext(cacheStub));
+    Result<RegionAPI.GetRegionResponse> result = operationHandler.process(serializationServiceStub,
+        MessageUtil.makeGetRegionRequest(TEST_REGION1), getNoAuthCacheExecutionContext(cacheStub));
     RegionAPI.GetRegionResponse response = result.getMessage();
     BasicTypes.Region region = response.getRegion();
     Assert.assertEquals(TEST_REGION1, region.getName());
@@ -93,8 +92,9 @@ public class GetRegionRequestOperationHandlerJUnitTest extends OperationHandlerJ
     when(emptyCache.rootRegions())
         .thenReturn(Collections.unmodifiableSet(new HashSet<Region<String, String>>()));
     String unknownRegionName = "UNKNOWN_REGION";
-    Result<RegionAPI.GetRegionResponse,MessageExecutionContext> result = operationHandler.process(serializationServiceStub,
-        MessageUtil.makeGetRegionRequest(unknownRegionName), getNoAuthExecutionContext(emptyCache));
+    Result<RegionAPI.GetRegionResponse> result = operationHandler.process(serializationServiceStub,
+        MessageUtil.makeGetRegionRequest(unknownRegionName),
+        getNoAuthCacheExecutionContext(emptyCache));
     Assert.assertTrue(result instanceof Failure);
     Assert.assertEquals(ProtocolErrorCode.REGION_NOT_FOUND.codeValue,
         result.getErrorMessage().getError().getErrorCode());
diff --git a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/GetRequestOperationHandlerJUnitTest.java b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/GetRequestOperationHandlerJUnitTest.java
index f3e80bf..302232c 100644
--- a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/GetRequestOperationHandlerJUnitTest.java
+++ b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/GetRequestOperationHandlerJUnitTest.java
@@ -25,10 +25,9 @@ import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import org.apache.geode.cache.Region;
-import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
 import org.apache.geode.internal.protocol.protobuf.BasicTypes;
 import org.apache.geode.internal.protocol.Failure;
-import org.apache.geode.internal.protocol.protobuf.ProtobufTestExecutionContext;
+import org.apache.geode.internal.protocol.ProtobufTestExecutionContext;
 import org.apache.geode.internal.protocol.ProtocolErrorCode;
 import org.apache.geode.internal.protocol.protobuf.RegionAPI;
 import org.apache.geode.internal.protocol.Result;
@@ -67,8 +66,8 @@ public class GetRequestOperationHandlerJUnitTest extends OperationHandlerJUnitTe
   @Test
   public void processReturnsTheEncodedValueFromTheRegion() throws Exception {
     RegionAPI.GetRequest getRequest = generateTestRequest(false, false, false);
-    Result<RegionAPI.GetResponse,MessageExecutionContext> result = operationHandler.process(serializationServiceStub,
-        getRequest, ProtobufTestExecutionContext.getNoAuthExecutionContext(cacheStub));
+    Result<RegionAPI.GetResponse> result = operationHandler.process(serializationServiceStub,
+        getRequest, ProtobufTestExecutionContext.getNoAuthCacheExecutionContext(cacheStub));
 
     Assert.assertTrue(result instanceof Success);
     Assert.assertEquals(BasicTypes.EncodedValue.ValueCase.STRINGRESULT,
@@ -80,8 +79,8 @@ public class GetRequestOperationHandlerJUnitTest extends OperationHandlerJUnitTe
   @Test
   public void processReturnsUnsucessfulResponseForInvalidRegion() throws Exception {
     RegionAPI.GetRequest getRequest = generateTestRequest(true, false, false);
-    Result<RegionAPI.GetResponse,MessageExecutionContext> response = operationHandler.process(serializationServiceStub,
-        getRequest, ProtobufTestExecutionContext.getNoAuthExecutionContext(cacheStub));
+    Result<RegionAPI.GetResponse> response = operationHandler.process(serializationServiceStub,
+        getRequest, ProtobufTestExecutionContext.getNoAuthCacheExecutionContext(cacheStub));
 
     Assert.assertTrue(response instanceof Failure);
     Assert.assertEquals(ProtocolErrorCode.REGION_NOT_FOUND.codeValue,
@@ -91,8 +90,8 @@ public class GetRequestOperationHandlerJUnitTest extends OperationHandlerJUnitTe
   @Test
   public void processReturnsKeyNotFoundWhenKeyIsNotFound() throws Exception {
     RegionAPI.GetRequest getRequest = generateTestRequest(false, true, false);
-    Result<RegionAPI.GetResponse,MessageExecutionContext> response = operationHandler.process(serializationServiceStub,
-        getRequest, ProtobufTestExecutionContext.getNoAuthExecutionContext(cacheStub));
+    Result<RegionAPI.GetResponse> response = operationHandler.process(serializationServiceStub,
+        getRequest, ProtobufTestExecutionContext.getNoAuthCacheExecutionContext(cacheStub));
 
     Assert.assertTrue(response instanceof Success);
   }
@@ -100,8 +99,8 @@ public class GetRequestOperationHandlerJUnitTest extends OperationHandlerJUnitTe
   @Test
   public void processReturnsLookupFailureWhenKeyFoundWithNoValue() throws Exception {
     RegionAPI.GetRequest getRequest = generateTestRequest(false, false, true);
-    Result<RegionAPI.GetResponse,MessageExecutionContext> response = operationHandler.process(serializationServiceStub,
-        getRequest, ProtobufTestExecutionContext.getNoAuthExecutionContext(cacheStub));
+    Result<RegionAPI.GetResponse> response = operationHandler.process(serializationServiceStub,
+        getRequest, ProtobufTestExecutionContext.getNoAuthCacheExecutionContext(cacheStub));
 
     Assert.assertTrue(response instanceof Success);
   }
@@ -119,8 +118,8 @@ public class GetRequestOperationHandlerJUnitTest extends OperationHandlerJUnitTe
         .setCustomEncodedValue(customEncodedValueBuilder).build();
     RegionAPI.GetRequest getRequest =
         ProtobufRequestUtilities.createGetRequest(TEST_REGION, encodedKey).getGetRequest();
-    Result<RegionAPI.GetResponse,MessageExecutionContext> response = operationHandler.process(serializationServiceStub,
-        getRequest, ProtobufTestExecutionContext.getNoAuthExecutionContext(cacheStub));
+    Result<RegionAPI.GetResponse> response = operationHandler.process(serializationServiceStub,
+        getRequest, ProtobufTestExecutionContext.getNoAuthCacheExecutionContext(cacheStub));
 
     Assert.assertTrue(response instanceof Failure);
     Assert.assertEquals(ProtocolErrorCode.VALUE_ENCODING_ERROR.codeValue,
diff --git a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/PutAllRequestOperationHandlerJUnitTest.java b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/PutAllRequestOperationHandlerJUnitTest.java
index 9e3e406..80b15ff 100644
--- a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/PutAllRequestOperationHandlerJUnitTest.java
+++ b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/PutAllRequestOperationHandlerJUnitTest.java
@@ -14,7 +14,7 @@
  */
 package org.apache.geode.internal.protocol.protobuf.operations;
 
-import static org.apache.geode.internal.protocol.protobuf.ProtobufTestExecutionContext.getNoAuthExecutionContext;
+import static org.apache.geode.internal.protocol.ProtobufTestExecutionContext.getNoAuthCacheExecutionContext;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 import static org.mockito.Mockito.any;
@@ -31,7 +31,6 @@ import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import org.apache.geode.cache.Region;
-import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
 import org.apache.geode.internal.protocol.protobuf.BasicTypes;
 import org.apache.geode.internal.protocol.protobuf.RegionAPI;
 import org.apache.geode.internal.protocol.Result;
@@ -71,8 +70,8 @@ public class PutAllRequestOperationHandlerJUnitTest extends OperationHandlerJUni
   public void processInsertsMultipleValidEntriesInCache() throws Exception {
     PutAllRequestOperationHandler operationHandler = new PutAllRequestOperationHandler();
 
-    Result<RegionAPI.PutAllResponse,MessageExecutionContext> result = operationHandler.process(serializationServiceStub,
-        generateTestRequest(false, true), getNoAuthExecutionContext(cacheStub));
+    Result<RegionAPI.PutAllResponse> result = operationHandler.process(serializationServiceStub,
+        generateTestRequest(false, true), getNoAuthCacheExecutionContext(cacheStub));
 
     Assert.assertTrue(result instanceof Success);
 
@@ -85,8 +84,8 @@ public class PutAllRequestOperationHandlerJUnitTest extends OperationHandlerJUni
   public void processWithInvalidEntrySucceedsAndReturnsFailedKey() throws Exception {
     PutAllRequestOperationHandler operationHandler = new PutAllRequestOperationHandler();
 
-    Result<RegionAPI.PutAllResponse,MessageExecutionContext> result = operationHandler.process(serializationServiceStub,
-        generateTestRequest(true, true), getNoAuthExecutionContext(cacheStub));
+    Result<RegionAPI.PutAllResponse> result = operationHandler.process(serializationServiceStub,
+        generateTestRequest(true, true), getNoAuthCacheExecutionContext(cacheStub));
 
     assertTrue(result instanceof Success);
     verify(regionMock).put(TEST_KEY1, TEST_VALUE1);
@@ -104,8 +103,8 @@ public class PutAllRequestOperationHandlerJUnitTest extends OperationHandlerJUni
   public void processWithNoEntriesPasses() throws Exception {
     PutAllRequestOperationHandler operationHandler = new PutAllRequestOperationHandler();
 
-    Result<RegionAPI.PutAllResponse,MessageExecutionContext> result = operationHandler.process(serializationServiceStub,
-        generateTestRequest(false, false), getNoAuthExecutionContext(cacheStub));
+    Result<RegionAPI.PutAllResponse> result = operationHandler.process(serializationServiceStub,
+        generateTestRequest(false, false), getNoAuthCacheExecutionContext(cacheStub));
 
     assertTrue(result instanceof Success);
 
diff --git a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/PutRequestOperationHandlerJUnitTest.java b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/PutRequestOperationHandlerJUnitTest.java
index 4dec3f0..04ce826 100644
--- a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/PutRequestOperationHandlerJUnitTest.java
+++ b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/PutRequestOperationHandlerJUnitTest.java
@@ -29,10 +29,9 @@ import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import org.apache.geode.cache.Region;
-import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
 import org.apache.geode.internal.protocol.protobuf.BasicTypes;
 import org.apache.geode.internal.protocol.Failure;
-import org.apache.geode.internal.protocol.protobuf.ProtobufTestExecutionContext;
+import org.apache.geode.internal.protocol.ProtobufTestExecutionContext;
 import org.apache.geode.internal.protocol.ProtocolErrorCode;
 import org.apache.geode.internal.protocol.protobuf.RegionAPI;
 import org.apache.geode.internal.protocol.Result;
@@ -63,8 +62,9 @@ public class PutRequestOperationHandlerJUnitTest extends OperationHandlerJUnitTe
   @Test
   public void test_puttingTheEncodedEntryIntoRegion() throws Exception {
     PutRequestOperationHandler operationHandler = new PutRequestOperationHandler();
-    Result<RegionAPI.PutResponse,MessageExecutionContext> result = operationHandler.process(serializationServiceStub,
-        generateTestRequest(), ProtobufTestExecutionContext.getNoAuthExecutionContext(cacheStub));
+    Result<RegionAPI.PutResponse> result =
+        operationHandler.process(serializationServiceStub, generateTestRequest(),
+            ProtobufTestExecutionContext.getNoAuthCacheExecutionContext(cacheStub));
 
     assertTrue(result instanceof Success);
 
@@ -92,8 +92,8 @@ public class PutRequestOperationHandlerJUnitTest extends OperationHandlerJUnitTe
     BasicTypes.Entry testEntry = ProtobufUtilities.createEntry(encodedKey, testValue);
     RegionAPI.PutRequest putRequest =
         ProtobufRequestUtilities.createPutRequest(TEST_REGION, testEntry).getPutRequest();
-    Result<RegionAPI.PutResponse,MessageExecutionContext> result = operationHandler.process(serializationServiceStub,
-        putRequest, ProtobufTestExecutionContext.getNoAuthExecutionContext(cacheStub));
+    Result<RegionAPI.PutResponse> result = operationHandler.process(serializationServiceStub,
+        putRequest, ProtobufTestExecutionContext.getNoAuthCacheExecutionContext(cacheStub));
 
     assertTrue(result instanceof Failure);
     assertEquals(ProtocolErrorCode.VALUE_ENCODING_ERROR.codeValue,
@@ -104,8 +104,9 @@ public class PutRequestOperationHandlerJUnitTest extends OperationHandlerJUnitTe
   public void test_RegionNotFound() throws Exception {
     when(cacheStub.getRegion(TEST_REGION)).thenReturn(null);
     PutRequestOperationHandler operationHandler = new PutRequestOperationHandler();
-    Result<RegionAPI.PutResponse,MessageExecutionContext> result = operationHandler.process(serializationServiceStub,
-        generateTestRequest(), ProtobufTestExecutionContext.getNoAuthExecutionContext(cacheStub));
+    Result<RegionAPI.PutResponse> result =
+        operationHandler.process(serializationServiceStub, generateTestRequest(),
+            ProtobufTestExecutionContext.getNoAuthCacheExecutionContext(cacheStub));
 
     assertTrue(result instanceof Failure);
     assertEquals(ProtocolErrorCode.REGION_NOT_FOUND.codeValue,
@@ -117,8 +118,9 @@ public class PutRequestOperationHandlerJUnitTest extends OperationHandlerJUnitTe
     when(regionMock.put(any(), any())).thenThrow(ClassCastException.class);
 
     PutRequestOperationHandler operationHandler = new PutRequestOperationHandler();
-    Result<RegionAPI.PutResponse,MessageExecutionContext> result = operationHandler.process(serializationServiceStub,
-        generateTestRequest(), ProtobufTestExecutionContext.getNoAuthExecutionContext(cacheStub));
+    Result<RegionAPI.PutResponse> result =
+        operationHandler.process(serializationServiceStub, generateTestRequest(),
+            ProtobufTestExecutionContext.getNoAuthCacheExecutionContext(cacheStub));
 
     assertTrue(result instanceof Failure);
     assertEquals(ProtocolErrorCode.CONSTRAINT_VIOLATION.codeValue,
diff --git a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/RemoveRequestOperationHandlerJUnitTest.java b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/RemoveRequestOperationHandlerJUnitTest.java
index e5166d0..3b8fc66 100644
--- a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/RemoveRequestOperationHandlerJUnitTest.java
+++ b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/RemoveRequestOperationHandlerJUnitTest.java
@@ -27,11 +27,10 @@ import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import org.apache.geode.cache.Region;
-import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
 import org.apache.geode.internal.protocol.protobuf.BasicTypes;
 import org.apache.geode.internal.protocol.protobuf.ClientProtocol;
 import org.apache.geode.internal.protocol.Failure;
-import org.apache.geode.internal.protocol.protobuf.ProtobufTestExecutionContext;
+import org.apache.geode.internal.protocol.ProtobufTestExecutionContext;
 import org.apache.geode.internal.protocol.ProtocolErrorCode;
 import org.apache.geode.internal.protocol.protobuf.RegionAPI;
 import org.apache.geode.internal.protocol.Result;
@@ -68,8 +67,8 @@ public class RemoveRequestOperationHandlerJUnitTest extends OperationHandlerJUni
   @Test
   public void processValidKeyRemovesTheEntryAndReturnSuccess() throws Exception {
     RegionAPI.RemoveRequest removeRequest = generateTestRequest(false, false).getRemoveRequest();
-    Result<RegionAPI.RemoveResponse,MessageExecutionContext> result = operationHandler.process(serializationServiceStub,
-        removeRequest, ProtobufTestExecutionContext.getNoAuthExecutionContext(cacheStub));
+    Result<RegionAPI.RemoveResponse> result = operationHandler.process(serializationServiceStub,
+        removeRequest, ProtobufTestExecutionContext.getNoAuthCacheExecutionContext(cacheStub));
 
     assertTrue(result instanceof Success);
     verify(regionStub).remove(TEST_KEY);
@@ -78,8 +77,8 @@ public class RemoveRequestOperationHandlerJUnitTest extends OperationHandlerJUni
   @Test
   public void processReturnsUnsucessfulResponseForInvalidRegion() throws Exception {
     RegionAPI.RemoveRequest removeRequest = generateTestRequest(true, false).getRemoveRequest();
-    Result<RegionAPI.RemoveResponse,MessageExecutionContext> result = operationHandler.process(serializationServiceStub,
-        removeRequest, ProtobufTestExecutionContext.getNoAuthExecutionContext(cacheStub));
+    Result<RegionAPI.RemoveResponse> result = operationHandler.process(serializationServiceStub,
+        removeRequest, ProtobufTestExecutionContext.getNoAuthCacheExecutionContext(cacheStub));
 
     assertTrue(result instanceof Failure);
     assertEquals(ProtocolErrorCode.REGION_NOT_FOUND.codeValue,
@@ -89,8 +88,8 @@ public class RemoveRequestOperationHandlerJUnitTest extends OperationHandlerJUni
   @Test
   public void processReturnsSuccessWhenKeyIsNotFound() throws Exception {
     RegionAPI.RemoveRequest removeRequest = generateTestRequest(false, true).getRemoveRequest();
-    Result<RegionAPI.RemoveResponse,MessageExecutionContext> result = operationHandler.process(serializationServiceStub,
-        removeRequest, ProtobufTestExecutionContext.getNoAuthExecutionContext(cacheStub));
+    Result<RegionAPI.RemoveResponse> result = operationHandler.process(serializationServiceStub,
+        removeRequest, ProtobufTestExecutionContext.getNoAuthCacheExecutionContext(cacheStub));
 
     assertTrue(result instanceof Success);
   }
@@ -109,8 +108,8 @@ public class RemoveRequestOperationHandlerJUnitTest extends OperationHandlerJUni
 
     RegionAPI.RemoveRequest removeRequest =
         ProtobufRequestUtilities.createRemoveRequest(TEST_REGION, encodedKey).getRemoveRequest();;
-    Result<RegionAPI.RemoveResponse,MessageExecutionContext> result = operationHandler.process(serializationServiceStub,
-        removeRequest, ProtobufTestExecutionContext.getNoAuthExecutionContext(cacheStub));
+    Result<RegionAPI.RemoveResponse> result = operationHandler.process(serializationServiceStub,
+        removeRequest, ProtobufTestExecutionContext.getNoAuthCacheExecutionContext(cacheStub));
 
     assertTrue(result instanceof Failure);
     assertEquals(ProtocolErrorCode.VALUE_ENCODING_ERROR.codeValue,

-- 
To stop receiving notification emails like this one, please contact
"commits@geode.apache.org" <co...@geode.apache.org>.

[geode] 03/04: Adding SecurityProcessor.java and returning MessageExecutionContext.java

Posted by ud...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

udo pushed a commit to branch feature/GEODE-3705
in repository https://gitbox.apache.org/repos/asf/geode.git

commit f8d6089596b0bd2c09e762b660d522ab133bc49e
Author: kohlmu-pivotal <uk...@pivotal.io>
AuthorDate: Fri Oct 20 16:08:56 2017 -0700

    Adding SecurityProcessor.java and returning MessageExecutionContext.java
---
 .../tier/sockets/ClientProtocolMessageHandler.java | 13 ++---
 .../tier/sockets/MessageExecutionContext.java      | 40 ++++++++++----
 .../{protobuf => }/EncodingTypeTranslator.java     |  3 +-
 .../internal/protocol/{protobuf => }/Failure.java  | 20 ++++---
 .../protocol/{protobuf => }/Handshaker.java        |  7 ++-
 .../protocol/{protobuf => }/OperationContext.java  |  3 +-
 .../internal/protocol/ProtobufCachePipeline.java   | 17 ++----
 .../protocol/{protobuf => }/ProtocolErrorCode.java |  2 +-
 .../internal/protocol/{protobuf => }/Result.java   |  7 ++-
 .../internal/protocol/{protobuf => }/Success.java  | 21 +++++---
 .../protocol/operations/OperationHandler.java      |  6 +--
 .../protocol/protobuf/ProtobufOpsProcessor.java    | 62 ++++++++++++----------
 .../protobuf/ProtobufSerializationService.java     |  1 +
 .../protocol/protobuf/ProtobufStreamProcessor.java | 21 +++++---
 .../operations/GetAllRequestOperationHandler.java  | 20 +++----
 .../GetAvailableServersOperationHandler.java       | 12 ++---
 .../GetRegionNamesRequestOperationHandler.java     | 12 ++---
 .../GetRegionRequestOperationHandler.java          | 18 +++----
 .../operations/GetRequestOperationHandler.java     | 28 +++++-----
 .../operations/PutAllRequestOperationHandler.java  | 20 +++----
 .../operations/PutRequestOperationHandler.java     | 22 ++++----
 .../operations/RemoveRequestOperationHandler.java  | 22 ++++----
 .../HandshakerRequestOperationHandler.java         | 23 ++++----
 .../AuthenticationRequestOperationHandler.java     | 57 ++++++++++++++++++++
 .../security/InvalidConfigAuthenticator.java       | 25 +++------
 .../security/ProtobufShiroAuthenticator.java       | 55 ++-----------------
 .../AuthenticationSecurityProcessor.java}          | 19 ++++---
 .../AuthorizationSecurityProcessor.java}           | 19 ++++---
 .../NoAuthenticationSecurityProcessor.java}        | 18 ++++---
 .../utilities/ProtobufResponseUtilities.java       |  4 +-
 .../protobuf/utilities/ProtobufUtilities.java      |  2 +-
 .../registry/OperationContextRegistry.java         | 10 +++-
 .../security/AuthenticationLookupService.java      |  2 +-
 .../internal/protocol/security/Authenticator.java  | 18 ++-----
 .../protocol/security/NoOpAuthenticator.java       |  8 +--
 .../SecurityProcessor.java}                        | 18 +++----
 geode-protobuf/src/main/proto/clientProtocol.proto |  4 +-
 geode-protobuf/src/main/proto/handshake_API.proto  |  5 ++
 .../protocol/AuthenticationIntegrationTest.java    | 17 +++---
 .../protocol/AuthorizationIntegrationTest.java     |  7 ++-
 .../acceptance/LocatorConnectionDUnitTest.java     |  3 +-
 ...TypeToSerializationTypeTranslatorJUnitTest.java |  1 +
 .../internal/protocol/protobuf/HandshakerTest.java | 18 +++----
 .../ProtobufShiroAuthenticatorJUnitTest.java       | 35 ++++++------
 .../protobuf/ProtobufStreamProcessorTest.java      |  6 ++-
 .../protobuf/ProtobufTestExecutionContext.java     |  6 ++-
 .../protocol/protobuf/ProtobufTestUtilities.java   |  2 +-
 .../GetAllRequestOperationHandlerJUnitTest.java    | 13 ++---
 ...tAvailableServersOperationHandlerJUnitTest.java |  4 +-
 ...egionNamesRequestOperationHandlerJUnitTest.java |  9 ++--
 .../GetRegionRequestOperationHandlerJUnitTest.java | 11 ++--
 .../GetRequestOperationHandlerJUnitTest.java       | 19 +++----
 .../PutAllRequestOperationHandlerJUnitTest.java    | 11 ++--
 .../PutRequestOperationHandlerJUnitTest.java       | 17 +++---
 .../RemoveRequestOperationHandlerJUnitTest.java    | 17 +++---
 55 files changed, 461 insertions(+), 399 deletions(-)

diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/cache/tier/sockets/ClientProtocolMessageHandler.java b/geode-protobuf/src/main/java/org/apache/geode/internal/cache/tier/sockets/ClientProtocolMessageHandler.java
index 4de279b..c1250e1 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/cache/tier/sockets/ClientProtocolMessageHandler.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/cache/tier/sockets/ClientProtocolMessageHandler.java
@@ -23,17 +23,18 @@ import org.apache.geode.StatisticsFactory;
 
 
 /**
- * This is an interface that other modules can implement to hook into
- * {@link GenericProtocolServerConnection} to handle messages sent to Geode.
+ * This is an interface that other modules can implement to hook into {@link
+ * GenericProtocolServerConnection} to handle messages sent to Geode.
  *
  * Currently, only one {@link ClientProtocolMessageHandler} at a time can be used in a Geode
- * instance. It gets wired into {@link ServerConnectionFactory} to create all instances of
- * {@link GenericProtocolServerConnection}.
+ * instance. It gets wired into {@link ServerConnectionFactory} to create all instances of {@link
+ * GenericProtocolServerConnection}.
  *
  * Implementors of this interface are expected to be able to be used for any number of connections
  * at a time (stateless except for the statistics).
  */
 public interface ClientProtocolMessageHandler {
-  void receiveMessage(InputStream inputStream, OutputStream outputStream,
-      MessageExecutionContext executionContext) throws IOException;
+  MessageExecutionContext receiveMessage(InputStream inputStream, OutputStream outputStream,
+                                         MessageExecutionContext executionContext)
+      throws IOException;
 }
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/cache/tier/sockets/MessageExecutionContext.java b/geode-protobuf/src/main/java/org/apache/geode/internal/cache/tier/sockets/MessageExecutionContext.java
index 0978e41..5c9a5c8 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/cache/tier/sockets/MessageExecutionContext.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/cache/tier/sockets/MessageExecutionContext.java
@@ -15,11 +15,16 @@
 
 package org.apache.geode.internal.cache.tier.sockets;
 
+
 import org.apache.geode.annotations.Experimental;
 import org.apache.geode.cache.Cache;
 import org.apache.geode.distributed.Locator;
 import org.apache.geode.distributed.internal.InternalLocator;
 import org.apache.geode.internal.exception.InvalidExecutionContextException;
+import org.apache.geode.internal.protocol.protobuf.security.processors.NoAuthenticationSecurityProcessor;
+import org.apache.geode.internal.protocol.security.Authenticator;
+import org.apache.geode.internal.protocol.security.NoOpAuthenticator;
+import org.apache.geode.internal.protocol.security.SecurityProcessor;
 import org.apache.geode.internal.protocol.statistics.ProtocolClientStatistics;
 import org.apache.geode.internal.protocol.security.Authorizer;
 import org.apache.geode.internal.protocol.security.NoOpAuthorizer;
@@ -29,16 +34,21 @@ public class MessageExecutionContext {
   private Cache cache;
   private Locator locator;
   private final Authorizer authorizer;
-  private final Object authenticatedSubject;
+  private final Object authenticatedToken;
   private final ProtocolClientStatistics statistics;
+  private final SecurityProcessor securityProcessor;
+  private final Authenticator authenticator;
 
 
-  public MessageExecutionContext(Cache cache, Authorizer streamAuthorizer,
-      Object authenticatedSubject, ProtocolClientStatistics statistics) {
+  public MessageExecutionContext(Cache cache, Authenticator authenticator,
+      Authorizer streamAuthorizer, Object authenticatedToken, ProtocolClientStatistics statistics,
+      SecurityProcessor securityProcessor) {
     this.cache = cache;
     this.authorizer = streamAuthorizer;
-    this.authenticatedSubject = authenticatedSubject;
+    this.authenticatedToken = authenticatedToken;
     this.statistics = statistics;
+    this.securityProcessor = securityProcessor;
+    this.authenticator = authenticator;
   }
 
   public MessageExecutionContext(InternalLocator locator, ProtocolClientStatistics statistics) {
@@ -46,14 +56,16 @@ public class MessageExecutionContext {
     // set a no-op authorizer until such time as locators implement authentication
     // and authorization checks
     this.authorizer = new NoOpAuthorizer();
+    this.authenticator = new NoOpAuthenticator();
     this.statistics = statistics;
-    this.authenticatedSubject = new Object();
+    this.authenticatedToken = new Object();
+    this.securityProcessor = new NoAuthenticationSecurityProcessor();
   }
 
   /**
    * Returns the cache associated with this execution
    * <p>
-   *
+   * 
    * @throws InvalidExecutionContextException if there is no cache available
    */
   public Cache getCache() throws InvalidExecutionContextException {
@@ -67,7 +79,7 @@ public class MessageExecutionContext {
   /**
    * Returns the locator associated with this execution
    * <p>
-   *
+   * 
    * @throws InvalidExecutionContextException if there is no locator available
    */
   public Locator getLocator() throws InvalidExecutionContextException {
@@ -86,10 +98,10 @@ public class MessageExecutionContext {
   }
 
   /**
-   * Returns the authentication/authorization subject associated with this execution
+   * Returns the authentication token associated with this execution
    */
-  public Object getSubject() {
-    return authenticatedSubject;
+  public Object getAuthenticationToken() {
+    return authenticatedToken;
   }
 
 
@@ -100,4 +112,12 @@ public class MessageExecutionContext {
   public ProtocolClientStatistics getStatistics() {
     return statistics;
   }
+
+  public Authenticator getAuthenticator() {
+    return authenticator;
+  }
+
+  public SecurityProcessor getSecurityProcessor() {
+    return securityProcessor;
+  }
 }
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/EncodingTypeTranslator.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/EncodingTypeTranslator.java
similarity index 96%
rename from geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/EncodingTypeTranslator.java
rename to geode-protobuf/src/main/java/org/apache/geode/internal/protocol/EncodingTypeTranslator.java
index 1868ced..5801292 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/EncodingTypeTranslator.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/EncodingTypeTranslator.java
@@ -12,11 +12,12 @@
  * or implied. See the License for the specific language governing permissions and limitations under
  * the License.
  */
-package org.apache.geode.internal.protocol.protobuf;
+package org.apache.geode.internal.protocol;
 
 import java.util.HashMap;
 
 import org.apache.geode.annotations.Experimental;
+import org.apache.geode.internal.protocol.protobuf.BasicTypes;
 import org.apache.geode.pdx.JSONFormatter;
 import org.apache.geode.pdx.PdxInstance;
 import org.apache.geode.internal.serialization.SerializationType;
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/Failure.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/Failure.java
similarity index 64%
rename from geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/Failure.java
rename to geode-protobuf/src/main/java/org/apache/geode/internal/protocol/Failure.java
index 6ac73de..cfcd46d 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/Failure.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/Failure.java
@@ -12,31 +12,39 @@
  * or implied. See the License for the specific language governing permissions and limitations under
  * the License.
  */
-package org.apache.geode.internal.protocol.protobuf;
+package org.apache.geode.internal.protocol;
 
 import java.util.function.Function;
 
 import org.apache.geode.annotations.Experimental;
+import org.apache.geode.internal.protocol.protobuf.ClientProtocol;
 
 @Experimental
-public class Failure<SuccessType> implements Result<SuccessType> {
+public class Failure<SuccessType, ExecutionContext> implements Result<SuccessType, ExecutionContext> {
   private final ClientProtocol.ErrorResponse errorResponse;
+  private final ExecutionContext executionContext;
 
-  public Failure(ClientProtocol.ErrorResponse errorResponse) {
+  public Failure(ClientProtocol.ErrorResponse errorResponse, ExecutionContext executionContext) {
     this.errorResponse = errorResponse;
+    this.executionContext = executionContext;
   }
 
-  public static <T> Failure<T> of(ClientProtocol.ErrorResponse errorResponse) {
-    return new Failure<>(errorResponse);
+  public static <T, V> Failure<T, V> of(ClientProtocol.ErrorResponse errorResponse, V context) {
+    return new Failure<>(errorResponse, context);
   }
 
   @Override
   public <T> T map(Function<SuccessType, T> successFunction,
-      Function<ClientProtocol.ErrorResponse, T> errorFunction) {
+                   Function<ClientProtocol.ErrorResponse, T> errorFunction) {
     return errorFunction.apply(errorResponse);
   }
 
   @Override
+  public ExecutionContext getExecutionContext() {
+    return executionContext;
+  }
+
+  @Override
   public SuccessType getMessage() {
     throw new RuntimeException("This is not a Success result");
   }
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/Handshaker.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/Handshaker.java
similarity index 88%
rename from geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/Handshaker.java
rename to geode-protobuf/src/main/java/org/apache/geode/internal/protocol/Handshaker.java
index 1812f92..1a5bb97 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/Handshaker.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/Handshaker.java
@@ -13,7 +13,7 @@
  * the License.
  */
 
-package org.apache.geode.internal.protocol.protobuf;
+package org.apache.geode.internal.protocol;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -22,8 +22,11 @@ import java.io.OutputStream;
 import org.apache.logging.log4j.Logger;
 
 import org.apache.geode.cache.IncompatibleVersionException;
+import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
 import org.apache.geode.internal.logging.LogService;
+import org.apache.geode.internal.protocol.Result;
 import org.apache.geode.internal.protocol.handshaker.ClientProtocolHandshaker;
+import org.apache.geode.internal.protocol.protobuf.HandshakeAPI;
 import org.apache.geode.internal.protocol.protobuf.operations.handshaker.HandshakerRequestOperationHandler;
 
 public class Handshaker implements ClientProtocolHandshaker {
@@ -45,7 +48,7 @@ public class Handshaker implements ClientProtocolHandshaker {
     // At this stage HandshakerRequestOperationHandler is not wired into the
     // ProtobufOpsStreamProcesser.
     // Thus passing in null serializationService and executionContext.
-    Result<HandshakeAPI.HandshakeResponse> result =
+    Result<HandshakeAPI.HandshakeResponse,MessageExecutionContext> result =
         handshakerRequestOperationHandler.process(null, handshakeRequest, null);
 
     HandshakeAPI.HandshakeResponse handshakeResponse = result.getMessage();
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/OperationContext.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/OperationContext.java
similarity index 96%
rename from geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/OperationContext.java
rename to geode-protobuf/src/main/java/org/apache/geode/internal/protocol/OperationContext.java
index 12c50aa..d4ca2a0 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/OperationContext.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/OperationContext.java
@@ -13,12 +13,13 @@
  * the License.
  */
 
-package org.apache.geode.internal.protocol.protobuf;
+package org.apache.geode.internal.protocol;
 
 import java.util.function.Function;
 
 import org.apache.geode.annotations.Experimental;
 import org.apache.geode.internal.protocol.operations.OperationHandler;
+import org.apache.geode.internal.protocol.protobuf.ClientProtocol;
 import org.apache.geode.security.ResourcePermission;
 
 @Experimental
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/ProtobufCachePipeline.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/ProtobufCachePipeline.java
index 3b6d2e5..a7764df 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/ProtobufCachePipeline.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/ProtobufCachePipeline.java
@@ -24,6 +24,7 @@ import org.apache.geode.cache.Cache;
 import org.apache.geode.internal.cache.tier.sockets.ClientProtocolProcessor;
 import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
 import org.apache.geode.internal.protocol.protobuf.ProtobufStreamProcessor;
+import org.apache.geode.internal.protocol.protobuf.security.processors.AuthenticationSecurityProcessor;
 import org.apache.geode.internal.protocol.security.Authenticator;
 import org.apache.geode.internal.protocol.security.Authorizer;
 import org.apache.geode.internal.protocol.statistics.ProtocolClientStatistics;
@@ -39,7 +40,7 @@ public final class ProtobufCachePipeline implements ClientProtocolProcessor {
   private final ProtobufStreamProcessor streamProcessor;
   private final Authenticator authenticator;
 
-  private Object authenticatorToken;
+  private MessageExecutionContext messageExecutionContext;
 
   ProtobufCachePipeline(ProtobufStreamProcessor protobufStreamProcessor,
       ProtocolClientStatistics statistics, Cache cache, Authenticator authenticator,
@@ -50,22 +51,14 @@ public final class ProtobufCachePipeline implements ClientProtocolProcessor {
     this.authenticator = authenticator;
     this.authorizer = authorizer;
     this.statistics.clientConnected();
+    this.messageExecutionContext = new MessageExecutionContext(cache, authenticator, authorizer,
+        null, statistics, new AuthenticationSecurityProcessor());
   }
 
   @Override
   public void processMessage(InputStream inputStream, OutputStream outputStream)
       throws IOException {
-    if (authenticatorToken == null) {
-      try {
-        authenticatorToken = authenticator.authenticate(inputStream, outputStream);
-      } catch (AuthenticationFailedException ex) {
-        statistics.incAuthenticationFailures();
-        throw new IOException(ex);
-      }
-    } else {
-      streamProcessor.receiveMessage(inputStream, outputStream,
-          new MessageExecutionContext(cache, authorizer, authenticatorToken, statistics));
-    }
+    messageExecutionContext = streamProcessor.receiveMessage(inputStream, outputStream, messageExecutionContext);
   }
 
   @Override
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/ProtocolErrorCode.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/ProtocolErrorCode.java
similarity index 96%
rename from geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/ProtocolErrorCode.java
rename to geode-protobuf/src/main/java/org/apache/geode/internal/protocol/ProtocolErrorCode.java
index 2c895d3..f74f613 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/ProtocolErrorCode.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/ProtocolErrorCode.java
@@ -12,7 +12,7 @@
  * or implied. See the License for the specific language governing permissions and limitations under
  * the License.
  */
-package org.apache.geode.internal.protocol.protobuf;
+package org.apache.geode.internal.protocol;
 
 public enum ProtocolErrorCode {
   GENERIC_FAILURE(1000),
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/Result.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/Result.java
similarity index 83%
copy from geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/Result.java
copy to geode-protobuf/src/main/java/org/apache/geode/internal/protocol/Result.java
index bada098..69a5f6f 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/Result.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/Result.java
@@ -12,17 +12,20 @@
  * or implied. See the License for the specific language governing permissions and limitations under
  * the License.
  */
-package org.apache.geode.internal.protocol.protobuf;
+package org.apache.geode.internal.protocol;
 
 import java.util.function.Function;
 
 import org.apache.geode.annotations.Experimental;
+import org.apache.geode.internal.protocol.protobuf.ClientProtocol;
 
 @Experimental
-public interface Result<SuccessType> {
+public interface Result<SuccessType,ExecutionContext> {
   <T> T map(Function<SuccessType, T> successFunction,
       Function<ClientProtocol.ErrorResponse, T> errorFunction);
 
+  ExecutionContext getExecutionContext();
+
   SuccessType getMessage();
 
   ClientProtocol.ErrorResponse getErrorMessage();
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/Success.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/Success.java
similarity index 66%
rename from geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/Success.java
rename to geode-protobuf/src/main/java/org/apache/geode/internal/protocol/Success.java
index 224b21c..0a3378e 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/Success.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/Success.java
@@ -12,31 +12,40 @@
  * or implied. See the License for the specific language governing permissions and limitations under
  * the License.
  */
-package org.apache.geode.internal.protocol.protobuf;
+package org.apache.geode.internal.protocol;
 
 import java.util.function.Function;
 
 import org.apache.geode.annotations.Experimental;
+import org.apache.geode.internal.protocol.protobuf.ClientProtocol;
 
 @Experimental
-public class Success<SuccessType> implements Result<SuccessType> {
+public class Success<SuccessType, ExecutionContext>
+    implements Result<SuccessType, ExecutionContext> {
   private final SuccessType successResponse;
+  private final ExecutionContext executionContext;
 
-  public Success(SuccessType successResponse) {
+  public Success(SuccessType successResponse, ExecutionContext executionContext) {
     this.successResponse = successResponse;
+    this.executionContext = executionContext;
   }
 
-  public static <T> Success<T> of(T result) {
-    return new Success<>(result);
+  public static <T,V> Success<T,V> of(T result,V context) {
+    return new Success<>(result,context);
   }
 
   @Override
   public <T> T map(Function<SuccessType, T> successFunction,
-      Function<ClientProtocol.ErrorResponse, T> errorFunction) {
+                   Function<ClientProtocol.ErrorResponse, T> errorFunction) {
     return successFunction.apply(successResponse);
   }
 
   @Override
+  public ExecutionContext getExecutionContext() {
+    return executionContext;
+  }
+
+  @Override
   public SuccessType getMessage() {
     return successResponse;
   }
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/operations/OperationHandler.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/operations/OperationHandler.java
index 9d2d482..13ce932 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/operations/OperationHandler.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/operations/OperationHandler.java
@@ -18,7 +18,7 @@ import org.apache.geode.annotations.Experimental;
 import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
 import org.apache.geode.internal.exception.InvalidExecutionContextException;
 import org.apache.geode.internal.protocol.protobuf.ProtobufOpsProcessor;
-import org.apache.geode.internal.protocol.protobuf.Result;
+import org.apache.geode.internal.protocol.Result;
 import org.apache.geode.internal.serialization.SerializationService;
 
 /**
@@ -33,7 +33,7 @@ public interface OperationHandler<Req, Resp> {
    * Decode the message, deserialize contained values using the serialization service, do the work
    * indicated on the provided cache, and return a response.
    */
-  Result<Resp> process(SerializationService serializationService, Req request,
-      MessageExecutionContext executionContext) throws InvalidExecutionContextException;
+  Result<Resp,MessageExecutionContext> process(SerializationService serializationService, Req request,
+      MessageExecutionContext messageExecutionContext) throws InvalidExecutionContextException;
 }
 
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/ProtobufOpsProcessor.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/ProtobufOpsProcessor.java
index 4fd1764..59407d6 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/ProtobufOpsProcessor.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/ProtobufOpsProcessor.java
@@ -20,12 +20,16 @@ import org.apache.geode.annotations.Experimental;
 import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
 import org.apache.geode.internal.exception.InvalidExecutionContextException;
 import org.apache.geode.internal.logging.LogService;
+import org.apache.geode.internal.protocol.Failure;
+import org.apache.geode.internal.protocol.OperationContext;
+import org.apache.geode.internal.protocol.Result;
+import org.apache.geode.internal.protocol.Success;
 import org.apache.geode.internal.protocol.registry.OperationContextRegistry;
-import org.apache.geode.internal.protocol.statistics.ProtocolClientStatistics;
 import org.apache.geode.internal.protocol.protobuf.utilities.ProtobufResponseUtilities;
+import org.apache.geode.internal.protocol.security.SecurityProcessor;
 import org.apache.geode.internal.serialization.SerializationService;
 
-import static org.apache.geode.internal.protocol.protobuf.ProtocolErrorCode.*;
+import static org.apache.geode.internal.protocol.ProtocolErrorCode.*;
 
 /**
  * This handles protobuf requests by determining the operation type of the request and dispatching
@@ -39,42 +43,46 @@ public class ProtobufOpsProcessor {
   private static final Logger logger = LogService.getLogger(ProtobufOpsProcessor.class);
 
   public ProtobufOpsProcessor(SerializationService serializationService,
-      OperationContextRegistry operationContextRegistry) {
+                              OperationContextRegistry operationContextRegistry) {
     this.serializationService = serializationService;
     this.operationContextRegistry = operationContextRegistry;
   }
 
-  public ClientProtocol.Response process(ClientProtocol.Request request,
-      MessageExecutionContext context) {
+  public Result<ClientProtocol.Response, MessageExecutionContext> process(
+      ClientProtocol.Request request,
+      MessageExecutionContext messageExecutionContext) {
     ClientProtocol.Request.RequestAPICase requestType = request.getRequestAPICase();
     logger.debug("Processing request of type {}", requestType);
     OperationContext operationContext = operationContextRegistry.getOperationContext(requestType);
-    ClientProtocol.Response.Builder builder;
     Result result;
-    try {
-      if (context.getAuthorizer().authorize(context.getSubject(),
-          operationContext.getAccessPermissionRequired())) {
-        result = operationContext.getOperationHandler().process(serializationService,
-            operationContext.getFromRequest().apply(request), context);
-      } else {
-        logger.warn("Received unauthorized request");
-        recordAuthorizationViolation(context);
-        result = Failure.of(ProtobufResponseUtilities.makeErrorResponse(AUTHORIZATION_FAILED,
-            "User isn't authorized for this operation."));
-      }
-    } catch (InvalidExecutionContextException exception) {
-      logger.error("Invalid execution context found for operation {}", requestType);
-      result = Failure.of(ProtobufResponseUtilities.makeErrorResponse(UNSUPPORTED_OPERATION,
-          "Invalid execution context found for operation."));
+
+    SecurityProcessor securityProcessor = messageExecutionContext.getSecurityProcessor();
+    if (securityProcessor.validateOperation(request, messageExecutionContext, operationContext)) {
+      result = processOperation(request, messageExecutionContext, requestType, operationContext);
+    } else {
+      logger.warn("Received unauthorized request");
+      messageExecutionContext.getStatistics().incAuthorizationViolations();
+      result = Failure.of(ProtobufResponseUtilities.makeErrorResponse(AUTHORIZATION_FAILED,
+          "User isn't authorized for this operation."), messageExecutionContext);
     }
 
-    builder = (ClientProtocol.Response.Builder) result.map(operationContext.getToResponse(),
-        operationContext.getToErrorResponse());
-    return builder.build();
+    ClientProtocol.Response
+        response =
+        ((ClientProtocol.Response.Builder) result.map(operationContext.getToResponse(),
+            operationContext.getToErrorResponse())).build();
+    return Success.of(response, (MessageExecutionContext) result.getExecutionContext());
   }
 
-  private void recordAuthorizationViolation(MessageExecutionContext context) {
-    ProtocolClientStatistics statistics = context.getStatistics();
-    statistics.incAuthorizationViolations();
+  private Result processOperation(ClientProtocol.Request request, MessageExecutionContext context,
+                                  ClientProtocol.Request.RequestAPICase requestType,
+                                  OperationContext operationContext) {
+    try {
+      return operationContext.getOperationHandler().process(serializationService,
+          operationContext.getFromRequest().apply(request), context);
+    } catch (InvalidExecutionContextException exception) {
+      logger.error("Invalid execution context found for operation {}", requestType);
+      return Failure.of(ProtobufResponseUtilities.makeErrorResponse(UNSUPPORTED_OPERATION,
+          "Invalid execution context found for operation."), context);
+    }
   }
 }
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/ProtobufSerializationService.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/ProtobufSerializationService.java
index 8b8dbb3..f7281fd 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/ProtobufSerializationService.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/ProtobufSerializationService.java
@@ -15,6 +15,7 @@
 package org.apache.geode.internal.protocol.protobuf;
 
 import org.apache.geode.annotations.Experimental;
+import org.apache.geode.internal.protocol.EncodingTypeTranslator;
 import org.apache.geode.internal.serialization.SerializationService;
 import org.apache.geode.internal.serialization.SerializationType;
 import org.apache.geode.internal.serialization.TypeCodec;
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/ProtobufStreamProcessor.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/ProtobufStreamProcessor.java
index 9386ee7..4250e93 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/ProtobufStreamProcessor.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/ProtobufStreamProcessor.java
@@ -25,6 +25,7 @@ import org.apache.geode.annotations.Experimental;
 import org.apache.geode.internal.cache.tier.sockets.ClientProtocolMessageHandler;
 import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
 import org.apache.geode.internal.logging.LogService;
+import org.apache.geode.internal.protocol.Result;
 import org.apache.geode.internal.protocol.exception.InvalidProtocolMessageException;
 import org.apache.geode.internal.protocol.registry.OperationContextRegistry;
 import org.apache.geode.internal.protocol.protobuf.serializer.ProtobufProtocolSerializer;
@@ -49,17 +50,19 @@ public class ProtobufStreamProcessor implements ClientProtocolMessageHandler {
   }
 
   @Override
-  public void receiveMessage(InputStream inputStream, OutputStream outputStream,
-      MessageExecutionContext executionContext) throws IOException {
+  public MessageExecutionContext receiveMessage(InputStream inputStream, OutputStream outputStream,
+                                                MessageExecutionContext executionContext)
+      throws IOException {
     try {
-      processOneMessage(inputStream, outputStream, executionContext);
+      return processOneMessage(inputStream, outputStream, executionContext);
     } catch (InvalidProtocolMessageException e) {
       throw new IOException(e);
     }
   }
 
-  private void processOneMessage(InputStream inputStream, OutputStream outputStream,
-      MessageExecutionContext executionContext)
+  private MessageExecutionContext processOneMessage(InputStream inputStream,
+                                                    OutputStream outputStream,
+                                                    MessageExecutionContext executionContext)
       throws InvalidProtocolMessageException, IOException {
     ClientProtocol.Message message = protobufProtocolSerializer.deserialize(inputStream);
     if (message == null) {
@@ -71,9 +74,13 @@ public class ProtobufStreamProcessor implements ClientProtocolMessageHandler {
     statistics.messageReceived(message.getSerializedSize());
 
     ClientProtocol.Request request = message.getRequest();
-    ClientProtocol.Response response = protobufOpsProcessor.process(request, executionContext);
-    ClientProtocol.Message responseMessage = ProtobufUtilities.createProtobufResponse(response);
+    Result<ClientProtocol.Response, MessageExecutionContext> result =
+        protobufOpsProcessor.process(request, executionContext);
+    ClientProtocol.Message
+        responseMessage =
+        ProtobufUtilities.createProtobufResponse(result.getMessage());
     statistics.messageSent(responseMessage.getSerializedSize());
     protobufProtocolSerializer.serialize(responseMessage, outputStream);
+    return result.getExecutionContext();
   }
 }
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/GetAllRequestOperationHandler.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/GetAllRequestOperationHandler.java
index 2001645..c15a44f 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/GetAllRequestOperationHandler.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/GetAllRequestOperationHandler.java
@@ -31,17 +31,17 @@ import org.apache.geode.internal.logging.LogService;
 import org.apache.geode.internal.protocol.operations.OperationHandler;
 import org.apache.geode.internal.protocol.protobuf.BasicTypes;
 import org.apache.geode.internal.protocol.protobuf.RegionAPI;
-import org.apache.geode.internal.protocol.protobuf.Failure;
-import org.apache.geode.internal.protocol.protobuf.ProtocolErrorCode;
-import org.apache.geode.internal.protocol.protobuf.Result;
-import org.apache.geode.internal.protocol.protobuf.Success;
+import org.apache.geode.internal.protocol.Failure;
+import org.apache.geode.internal.protocol.ProtocolErrorCode;
+import org.apache.geode.internal.protocol.Result;
+import org.apache.geode.internal.protocol.Success;
 import org.apache.geode.internal.protocol.protobuf.utilities.ProtobufResponseUtilities;
 import org.apache.geode.internal.protocol.protobuf.utilities.ProtobufUtilities;
 import org.apache.geode.internal.serialization.SerializationService;
 import org.apache.geode.internal.serialization.exception.UnsupportedEncodingTypeException;
 import org.apache.geode.internal.serialization.registry.exception.CodecNotRegisteredForTypeException;
 
-import static org.apache.geode.internal.protocol.protobuf.ProtocolErrorCode.*;
+import static org.apache.geode.internal.protocol.ProtocolErrorCode.*;
 
 @Experimental
 public class GetAllRequestOperationHandler
@@ -49,15 +49,15 @@ public class GetAllRequestOperationHandler
   private static final Logger logger = LogService.getLogger();
 
   @Override
-  public Result<RegionAPI.GetAllResponse> process(SerializationService serializationService,
-      RegionAPI.GetAllRequest request, MessageExecutionContext executionContext)
+  public Result<RegionAPI.GetAllResponse,MessageExecutionContext> process(SerializationService serializationService,
+      RegionAPI.GetAllRequest request, MessageExecutionContext messageExecutionContext)
       throws InvalidExecutionContextException {
     String regionName = request.getRegionName();
-    Region region = executionContext.getCache().getRegion(regionName);
+    Region region = messageExecutionContext.getCache().getRegion(regionName);
     if (region == null) {
       logger.error("Received GetAll request for non-existing region {}", regionName);
       return Failure
-          .of(ProtobufResponseUtilities.makeErrorResponse(REGION_NOT_FOUND, "Region not found"));
+          .of(ProtobufResponseUtilities.makeErrorResponse(REGION_NOT_FOUND, "Region not found"),messageExecutionContext);
     }
 
     Map<Boolean, List<Object>> resultsCollection = request.getKeyList().stream()
@@ -73,7 +73,7 @@ public class GetAllRequestOperationHandler
       responseBuilder.addFailures((BasicTypes.KeyedError) entry);
     }
 
-    return Success.of(responseBuilder.build());
+    return Success.of(responseBuilder.build(),messageExecutionContext);
   }
 
   private Object processOneMessage(SerializationService serializationService, Region region,
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/GetAvailableServersOperationHandler.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/GetAvailableServersOperationHandler.java
index c8f663f..ec2c917 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/GetAvailableServersOperationHandler.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/GetAvailableServersOperationHandler.java
@@ -25,9 +25,9 @@ import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
 import org.apache.geode.internal.exception.InvalidExecutionContextException;
 import org.apache.geode.internal.protocol.operations.OperationHandler;
 import org.apache.geode.internal.protocol.protobuf.BasicTypes;
-import org.apache.geode.internal.protocol.protobuf.Result;
+import org.apache.geode.internal.protocol.Result;
 import org.apache.geode.internal.protocol.protobuf.ServerAPI;
-import org.apache.geode.internal.protocol.protobuf.Success;
+import org.apache.geode.internal.protocol.Success;
 import org.apache.geode.internal.serialization.SerializationService;
 
 @Experimental
@@ -35,11 +35,11 @@ public class GetAvailableServersOperationHandler implements
     OperationHandler<ServerAPI.GetAvailableServersRequest, ServerAPI.GetAvailableServersResponse> {
 
   @Override
-  public Result<ServerAPI.GetAvailableServersResponse> process(
+  public Result<ServerAPI.GetAvailableServersResponse,MessageExecutionContext> process(
       SerializationService serializationService, ServerAPI.GetAvailableServersRequest request,
-      MessageExecutionContext executionContext) throws InvalidExecutionContextException {
+      MessageExecutionContext messageExecutionContext) throws InvalidExecutionContextException {
 
-    InternalLocator internalLocator = (InternalLocator) executionContext.getLocator();
+    InternalLocator internalLocator = (InternalLocator) messageExecutionContext.getLocator();
     ArrayList serversFromSnapshot =
         internalLocator.getServerLocatorAdvisee().getLoadSnapshot().getServers(null);
     if (serversFromSnapshot == null) {
@@ -51,7 +51,7 @@ public class GetAvailableServersOperationHandler implements
         .collect(Collectors.toList());
     ServerAPI.GetAvailableServersResponse.Builder builder =
         ServerAPI.GetAvailableServersResponse.newBuilder().addAllServers(servers);
-    return Success.of(builder.build());
+    return Success.of(builder.build(),messageExecutionContext);
   }
 
   private BasicTypes.Server getServerProtobufMessage(ServerLocation serverLocation) {
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/GetRegionNamesRequestOperationHandler.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/GetRegionNamesRequestOperationHandler.java
index 7ffdcd8..c8e6573 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/GetRegionNamesRequestOperationHandler.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/GetRegionNamesRequestOperationHandler.java
@@ -22,8 +22,8 @@ import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
 import org.apache.geode.internal.exception.InvalidExecutionContextException;
 import org.apache.geode.internal.protocol.operations.OperationHandler;
 import org.apache.geode.internal.protocol.protobuf.RegionAPI;
-import org.apache.geode.internal.protocol.protobuf.Result;
-import org.apache.geode.internal.protocol.protobuf.Success;
+import org.apache.geode.internal.protocol.Result;
+import org.apache.geode.internal.protocol.Success;
 import org.apache.geode.internal.protocol.protobuf.utilities.ProtobufResponseUtilities;
 import org.apache.geode.internal.serialization.SerializationService;
 
@@ -32,10 +32,10 @@ public class GetRegionNamesRequestOperationHandler
     implements OperationHandler<RegionAPI.GetRegionNamesRequest, RegionAPI.GetRegionNamesResponse> {
 
   @Override
-  public Result<RegionAPI.GetRegionNamesResponse> process(SerializationService serializationService,
-      RegionAPI.GetRegionNamesRequest request, MessageExecutionContext executionContext)
+  public Result<RegionAPI.GetRegionNamesResponse,MessageExecutionContext> process(SerializationService serializationService,
+      RegionAPI.GetRegionNamesRequest request, MessageExecutionContext messageExecutionContext)
       throws InvalidExecutionContextException {
-    Set<Region<?, ?>> regions = executionContext.getCache().rootRegions();
-    return Success.of(ProtobufResponseUtilities.createGetRegionNamesResponse(regions));
+    Set<Region<?, ?>> regions = messageExecutionContext.getCache().rootRegions();
+    return Success.of(ProtobufResponseUtilities.createGetRegionNamesResponse(regions),messageExecutionContext);
   }
 }
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/GetRegionRequestOperationHandler.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/GetRegionRequestOperationHandler.java
index 78d3d5c..032d72c 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/GetRegionRequestOperationHandler.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/GetRegionRequestOperationHandler.java
@@ -23,15 +23,15 @@ import org.apache.geode.internal.exception.InvalidExecutionContextException;
 import org.apache.geode.internal.logging.LogService;
 import org.apache.geode.internal.protocol.protobuf.BasicTypes;
 import org.apache.geode.internal.protocol.operations.OperationHandler;
-import org.apache.geode.internal.protocol.protobuf.Failure;
+import org.apache.geode.internal.protocol.Failure;
 import org.apache.geode.internal.protocol.protobuf.RegionAPI;
-import org.apache.geode.internal.protocol.protobuf.Result;
-import org.apache.geode.internal.protocol.protobuf.Success;
+import org.apache.geode.internal.protocol.Result;
+import org.apache.geode.internal.protocol.Success;
 import org.apache.geode.internal.protocol.protobuf.utilities.ProtobufResponseUtilities;
 import org.apache.geode.internal.protocol.protobuf.utilities.ProtobufUtilities;
 import org.apache.geode.internal.serialization.SerializationService;
 
-import static org.apache.geode.internal.protocol.protobuf.ProtocolErrorCode.*;
+import static org.apache.geode.internal.protocol.ProtocolErrorCode.*;
 
 @Experimental
 public class GetRegionRequestOperationHandler
@@ -39,20 +39,20 @@ public class GetRegionRequestOperationHandler
   private static final Logger logger = LogService.getLogger();
 
   @Override
-  public Result<RegionAPI.GetRegionResponse> process(SerializationService serializationService,
-      RegionAPI.GetRegionRequest request, MessageExecutionContext executionContext)
+  public Result<RegionAPI.GetRegionResponse,MessageExecutionContext> process(SerializationService serializationService,
+      RegionAPI.GetRegionRequest request, MessageExecutionContext messageExecutionContext)
       throws InvalidExecutionContextException {
     String regionName = request.getRegionName();
 
-    Region region = executionContext.getCache().getRegion(regionName);
+    Region region = messageExecutionContext.getCache().getRegion(regionName);
     if (region == null) {
       logger.error("Received GetRegion request for non-existing region {}", regionName);
       return Failure.of(ProtobufResponseUtilities.makeErrorResponse(REGION_NOT_FOUND,
-          "No region exists for name: " + regionName));
+          "No region exists for name: " + regionName),messageExecutionContext);
     }
 
     BasicTypes.Region protoRegion = ProtobufUtilities.createRegionMessageFromRegion(region);
 
-    return Success.of(RegionAPI.GetRegionResponse.newBuilder().setRegion(protoRegion).build());
+    return Success.of(RegionAPI.GetRegionResponse.newBuilder().setRegion(protoRegion).build(),messageExecutionContext);
   }
 }
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/GetRequestOperationHandler.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/GetRequestOperationHandler.java
index e7702b8..0e7c6a2 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/GetRequestOperationHandler.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/GetRequestOperationHandler.java
@@ -23,18 +23,17 @@ import org.apache.geode.internal.exception.InvalidExecutionContextException;
 import org.apache.geode.internal.logging.LogService;
 import org.apache.geode.internal.protocol.operations.OperationHandler;
 import org.apache.geode.internal.protocol.protobuf.BasicTypes;
-import org.apache.geode.internal.protocol.protobuf.Failure;
-import org.apache.geode.internal.protocol.protobuf.ProtocolErrorCode;
+import org.apache.geode.internal.protocol.Failure;
 import org.apache.geode.internal.protocol.protobuf.RegionAPI;
-import org.apache.geode.internal.protocol.protobuf.Result;
-import org.apache.geode.internal.protocol.protobuf.Success;
+import org.apache.geode.internal.protocol.Result;
+import org.apache.geode.internal.protocol.Success;
 import org.apache.geode.internal.protocol.protobuf.utilities.ProtobufResponseUtilities;
 import org.apache.geode.internal.protocol.protobuf.utilities.ProtobufUtilities;
 import org.apache.geode.internal.serialization.SerializationService;
 import org.apache.geode.internal.serialization.exception.UnsupportedEncodingTypeException;
 import org.apache.geode.internal.serialization.registry.exception.CodecNotRegisteredForTypeException;
 
-import static org.apache.geode.internal.protocol.protobuf.ProtocolErrorCode.*;
+import static org.apache.geode.internal.protocol.ProtocolErrorCode.*;
 
 @Experimental
 public class GetRequestOperationHandler
@@ -42,15 +41,17 @@ public class GetRequestOperationHandler
   private static final Logger logger = LogService.getLogger();
 
   @Override
-  public Result<RegionAPI.GetResponse> process(SerializationService serializationService,
-      RegionAPI.GetRequest request, MessageExecutionContext executionContext)
+  public Result<RegionAPI.GetResponse, MessageExecutionContext> process(
+      SerializationService serializationService,
+      RegionAPI.GetRequest request, MessageExecutionContext messageExecutionContext)
       throws InvalidExecutionContextException {
     String regionName = request.getRegionName();
-    Region region = executionContext.getCache().getRegion(regionName);
+    Region region = messageExecutionContext.getCache().getRegion(regionName);
     if (region == null) {
       logger.error("Received Get request for non-existing region {}", regionName);
       return Failure
-          .of(ProtobufResponseUtilities.makeErrorResponse(REGION_NOT_FOUND, "Region not found"));
+          .of(ProtobufResponseUtilities.makeErrorResponse(REGION_NOT_FOUND, "Region not found"),
+              messageExecutionContext);
     }
 
     try {
@@ -58,20 +59,21 @@ public class GetRequestOperationHandler
       Object resultValue = region.get(decodedKey);
 
       if (resultValue == null) {
-        return Success.of(RegionAPI.GetResponse.newBuilder().build());
+        return Success.of(RegionAPI.GetResponse.newBuilder().build(), messageExecutionContext);
       }
 
       BasicTypes.EncodedValue encodedValue =
           ProtobufUtilities.createEncodedValue(serializationService, resultValue);
-      return Success.of(RegionAPI.GetResponse.newBuilder().setResult(encodedValue).build());
+      return Success.of(RegionAPI.GetResponse.newBuilder().setResult(encodedValue).build(),
+          messageExecutionContext);
     } catch (UnsupportedEncodingTypeException ex) {
       logger.error("Received Get request with unsupported encoding: {}", ex);
       return Failure.of(ProtobufResponseUtilities.makeErrorResponse(VALUE_ENCODING_ERROR,
-          "Encoding not supported."));
+          "Encoding not supported."), messageExecutionContext);
     } catch (CodecNotRegisteredForTypeException ex) {
       logger.error("Got codec error when decoding Get request: {}", ex);
       return Failure.of(ProtobufResponseUtilities.makeErrorResponse(VALUE_ENCODING_ERROR,
-          "Codec error in protobuf deserialization."));
+          "Codec error in protobuf deserialization."), messageExecutionContext);
     }
   }
 }
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/PutAllRequestOperationHandler.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/PutAllRequestOperationHandler.java
index 300616b..54f9391 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/PutAllRequestOperationHandler.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/PutAllRequestOperationHandler.java
@@ -26,18 +26,18 @@ import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
 import org.apache.geode.internal.exception.InvalidExecutionContextException;
 import org.apache.geode.internal.protocol.operations.OperationHandler;
 import org.apache.geode.internal.protocol.protobuf.BasicTypes;
-import org.apache.geode.internal.protocol.protobuf.Failure;
-import org.apache.geode.internal.protocol.protobuf.ProtocolErrorCode;
+import org.apache.geode.internal.protocol.Failure;
+import org.apache.geode.internal.protocol.ProtocolErrorCode;
 import org.apache.geode.internal.protocol.protobuf.RegionAPI;
-import org.apache.geode.internal.protocol.protobuf.Result;
-import org.apache.geode.internal.protocol.protobuf.Success;
+import org.apache.geode.internal.protocol.Result;
+import org.apache.geode.internal.protocol.Success;
 import org.apache.geode.internal.protocol.protobuf.utilities.ProtobufResponseUtilities;
 import org.apache.geode.internal.protocol.protobuf.utilities.ProtobufUtilities;
 import org.apache.geode.internal.serialization.SerializationService;
 import org.apache.geode.internal.serialization.exception.UnsupportedEncodingTypeException;
 import org.apache.geode.internal.serialization.registry.exception.CodecNotRegisteredForTypeException;
 
-import static org.apache.geode.internal.protocol.protobuf.ProtocolErrorCode.*;
+import static org.apache.geode.internal.protocol.ProtocolErrorCode.*;
 
 @Experimental
 public class PutAllRequestOperationHandler
@@ -45,23 +45,23 @@ public class PutAllRequestOperationHandler
   private static final Logger logger = LogManager.getLogger();
 
   @Override
-  public Result<RegionAPI.PutAllResponse> process(SerializationService serializationService,
-      RegionAPI.PutAllRequest putAllRequest, MessageExecutionContext executionContext)
+  public Result<RegionAPI.PutAllResponse,MessageExecutionContext> process(SerializationService serializationService,
+      RegionAPI.PutAllRequest putAllRequest, MessageExecutionContext messageExecutionContext)
       throws InvalidExecutionContextException {
     String regionName = putAllRequest.getRegionName();
-    Region region = executionContext.getCache().getRegion(regionName);
+    Region region = messageExecutionContext.getCache().getRegion(regionName);
 
     if (region == null) {
       logger.error("Received PutAll request for non-existing region {}", regionName);
       return Failure.of(ProtobufResponseUtilities.makeErrorResponse(REGION_NOT_FOUND,
-          "Region passed does not exist: " + regionName));
+          "Region passed does not exist: " + regionName),messageExecutionContext);
     }
 
     RegionAPI.PutAllResponse.Builder builder = RegionAPI.PutAllResponse.newBuilder()
         .addAllFailedKeys(putAllRequest.getEntryList().stream()
             .map((entry) -> singlePut(serializationService, region, entry)).filter(Objects::nonNull)
             .collect(Collectors.toList()));
-    return Success.of(builder.build());
+    return Success.of(builder.build(),messageExecutionContext);
   }
 
   private BasicTypes.KeyedError singlePut(SerializationService serializationService, Region region,
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/PutRequestOperationHandler.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/PutRequestOperationHandler.java
index 81c842d..719fa85 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/PutRequestOperationHandler.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/PutRequestOperationHandler.java
@@ -23,17 +23,17 @@ import org.apache.geode.internal.exception.InvalidExecutionContextException;
 import org.apache.geode.internal.logging.LogService;
 import org.apache.geode.internal.protocol.operations.OperationHandler;
 import org.apache.geode.internal.protocol.protobuf.BasicTypes;
-import org.apache.geode.internal.protocol.protobuf.Failure;
+import org.apache.geode.internal.protocol.Failure;
 import org.apache.geode.internal.protocol.protobuf.RegionAPI;
-import org.apache.geode.internal.protocol.protobuf.Result;
-import org.apache.geode.internal.protocol.protobuf.Success;
+import org.apache.geode.internal.protocol.Result;
+import org.apache.geode.internal.protocol.Success;
 import org.apache.geode.internal.protocol.protobuf.utilities.ProtobufResponseUtilities;
 import org.apache.geode.internal.protocol.protobuf.utilities.ProtobufUtilities;
 import org.apache.geode.internal.serialization.SerializationService;
 import org.apache.geode.internal.serialization.exception.UnsupportedEncodingTypeException;
 import org.apache.geode.internal.serialization.registry.exception.CodecNotRegisteredForTypeException;
 
-import static org.apache.geode.internal.protocol.protobuf.ProtocolErrorCode.*;
+import static org.apache.geode.internal.protocol.ProtocolErrorCode.*;
 
 @Experimental
 public class PutRequestOperationHandler
@@ -41,15 +41,15 @@ public class PutRequestOperationHandler
   private static final Logger logger = LogService.getLogger();
 
   @Override
-  public Result<RegionAPI.PutResponse> process(SerializationService serializationService,
-      RegionAPI.PutRequest request, MessageExecutionContext executionContext)
+  public Result<RegionAPI.PutResponse,MessageExecutionContext> process(SerializationService serializationService,
+      RegionAPI.PutRequest request, MessageExecutionContext messageExecutionContext)
       throws InvalidExecutionContextException {
     String regionName = request.getRegionName();
-    Region region = executionContext.getCache().getRegion(regionName);
+    Region region = messageExecutionContext.getCache().getRegion(regionName);
     if (region == null) {
       logger.warn("Received Put request for non-existing region: {}", regionName);
       return Failure.of(ProtobufResponseUtilities.makeErrorResponse(REGION_NOT_FOUND,
-          "Region passed by client did not exist: " + regionName));
+          "Region passed by client did not exist: " + regionName),messageExecutionContext);
     }
 
     try {
@@ -59,16 +59,16 @@ public class PutRequestOperationHandler
       Object decodedKey = ProtobufUtilities.decodeValue(serializationService, entry.getKey());
       try {
         region.put(decodedKey, decodedValue);
-        return Success.of(RegionAPI.PutResponse.newBuilder().build());
+        return Success.of(RegionAPI.PutResponse.newBuilder().build(),messageExecutionContext);
       } catch (ClassCastException ex) {
         logger.error("Received Put request with invalid key type: {}", ex);
         return Failure.of(ProtobufResponseUtilities.makeErrorResponse(CONSTRAINT_VIOLATION,
-            "invalid key or value type for region " + regionName));
+            "invalid key or value type for region " + regionName),messageExecutionContext);
       }
     } catch (UnsupportedEncodingTypeException | CodecNotRegisteredForTypeException ex) {
       logger.error("Got codec error when decoding Put request: {}", ex);
       return Failure
-          .of(ProtobufResponseUtilities.makeErrorResponse(VALUE_ENCODING_ERROR, ex.getMessage()));
+          .of(ProtobufResponseUtilities.makeErrorResponse(VALUE_ENCODING_ERROR, ex.getMessage()),messageExecutionContext);
     }
   }
 }
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/RemoveRequestOperationHandler.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/RemoveRequestOperationHandler.java
index 0e3b148..2d401fa 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/RemoveRequestOperationHandler.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/RemoveRequestOperationHandler.java
@@ -22,17 +22,17 @@ import org.apache.geode.cache.Region;
 import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
 import org.apache.geode.internal.exception.InvalidExecutionContextException;
 import org.apache.geode.internal.protocol.operations.OperationHandler;
-import org.apache.geode.internal.protocol.protobuf.Failure;
+import org.apache.geode.internal.protocol.Failure;
 import org.apache.geode.internal.protocol.protobuf.RegionAPI;
-import org.apache.geode.internal.protocol.protobuf.Result;
-import org.apache.geode.internal.protocol.protobuf.Success;
+import org.apache.geode.internal.protocol.Result;
+import org.apache.geode.internal.protocol.Success;
 import org.apache.geode.internal.protocol.protobuf.utilities.ProtobufResponseUtilities;
 import org.apache.geode.internal.protocol.protobuf.utilities.ProtobufUtilities;
 import org.apache.geode.internal.serialization.SerializationService;
 import org.apache.geode.internal.serialization.exception.UnsupportedEncodingTypeException;
 import org.apache.geode.internal.serialization.registry.exception.CodecNotRegisteredForTypeException;
 
-import static org.apache.geode.internal.protocol.protobuf.ProtocolErrorCode.*;
+import static org.apache.geode.internal.protocol.ProtocolErrorCode.*;
 
 @Experimental
 public class RemoveRequestOperationHandler
@@ -40,32 +40,32 @@ public class RemoveRequestOperationHandler
   private static final Logger logger = LogManager.getLogger();
 
   @Override
-  public Result<RegionAPI.RemoveResponse> process(SerializationService serializationService,
-      RegionAPI.RemoveRequest request, MessageExecutionContext executionContext)
+  public Result<RegionAPI.RemoveResponse,MessageExecutionContext> process(SerializationService serializationService,
+      RegionAPI.RemoveRequest request, MessageExecutionContext messageExecutionContext)
       throws InvalidExecutionContextException {
 
     String regionName = request.getRegionName();
-    Region region = executionContext.getCache().getRegion(regionName);
+    Region region = messageExecutionContext.getCache().getRegion(regionName);
     if (region == null) {
       logger.error("Received Remove request for non-existing region {}", regionName);
       return Failure
-          .of(ProtobufResponseUtilities.makeErrorResponse(REGION_NOT_FOUND, "Region not found"));
+          .of(ProtobufResponseUtilities.makeErrorResponse(REGION_NOT_FOUND, "Region not found"),messageExecutionContext);
     }
 
     try {
       Object decodedKey = ProtobufUtilities.decodeValue(serializationService, request.getKey());
       region.remove(decodedKey);
 
-      return Success.of(RegionAPI.RemoveResponse.newBuilder().build());
+      return Success.of(RegionAPI.RemoveResponse.newBuilder().build(),messageExecutionContext);
     } catch (UnsupportedEncodingTypeException ex) {
       // can be thrown by encoding or decoding.
       logger.error("Received Remove request with unsupported encoding: {}", ex);
       return Failure.of(ProtobufResponseUtilities.makeErrorResponse(VALUE_ENCODING_ERROR,
-          "Encoding not supported: " + ex.getMessage()));
+          "Encoding not supported: " + ex.getMessage()),messageExecutionContext);
     } catch (CodecNotRegisteredForTypeException ex) {
       logger.error("Got codec error when decoding Remove request: {}", ex);
       return Failure.of(ProtobufResponseUtilities.makeErrorResponse(VALUE_ENCODING_ERROR,
-          "Codec error in protobuf deserialization: " + ex.getMessage()));
+          "Codec error in protobuf deserialization: " + ex.getMessage()),messageExecutionContext);
     }
   }
 }
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/handshaker/HandshakerRequestOperationHandler.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/handshaker/HandshakerRequestOperationHandler.java
index b31247b..0b2e3b6 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/handshaker/HandshakerRequestOperationHandler.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/handshaker/HandshakerRequestOperationHandler.java
@@ -14,24 +14,17 @@
  */
 package org.apache.geode.internal.protocol.protobuf.operations.handshaker;
 
-import static org.apache.geode.internal.protocol.protobuf.ProtocolErrorCode.CONSTRAINT_VIOLATION;
-import static org.apache.geode.internal.protocol.protobuf.ProtocolErrorCode.UNSUPPORTED_VERSION;
+import static org.apache.geode.internal.protocol.ProtocolErrorCode.UNSUPPORTED_VERSION;
 
 import org.apache.logging.log4j.Logger;
 
-import org.apache.geode.cache.IncompatibleVersionException;
 import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
-import org.apache.geode.internal.exception.InvalidExecutionContextException;
 import org.apache.geode.internal.logging.LogService;
 import org.apache.geode.internal.protocol.operations.OperationHandler;
 import org.apache.geode.internal.protocol.protobuf.BasicTypes;
-import org.apache.geode.internal.protocol.protobuf.ClientProtocol;
-import org.apache.geode.internal.protocol.protobuf.Failure;
 import org.apache.geode.internal.protocol.protobuf.HandshakeAPI;
-import org.apache.geode.internal.protocol.protobuf.ProtocolErrorCode;
-import org.apache.geode.internal.protocol.protobuf.Result;
-import org.apache.geode.internal.protocol.protobuf.Success;
-import org.apache.geode.internal.protocol.protobuf.utilities.ProtobufResponseUtilities;
+import org.apache.geode.internal.protocol.Result;
+import org.apache.geode.internal.protocol.Success;
 import org.apache.geode.internal.serialization.SerializationService;
 
 public class HandshakerRequestOperationHandler
@@ -42,8 +35,9 @@ public class HandshakerRequestOperationHandler
       LogService.getLogger(HandshakerRequestOperationHandler.class);
 
   @Override
-  public Result<HandshakeAPI.HandshakeResponse> process(SerializationService serializationService,
-      HandshakeAPI.HandshakeRequest request, MessageExecutionContext executionContext) {
+  public Result<HandshakeAPI.HandshakeResponse, MessageExecutionContext> process(
+      SerializationService serializationService,
+      HandshakeAPI.HandshakeRequest request, MessageExecutionContext messageExecutionContext) {
     HandshakeAPI.Semver version = request.getVersion();
     if (version.getMajor() != MAJOR_VERSION || version.getMinor() < MINOR_VERSION) {
       logger.warn("Version mismatch: incompatible version. Supported version is: " + MAJOR_VERSION
@@ -52,8 +46,9 @@ public class HandshakerRequestOperationHandler
           .setError(BasicTypes.Error.newBuilder().setErrorCode(UNSUPPORTED_VERSION.codeValue)
               .setMessage("Version mismatch: incompatible version. Supported version is: "
                   + MAJOR_VERSION + "." + MINOR_VERSION))
-          .build());
+          .build(), messageExecutionContext);
     }
-    return Success.of(HandshakeAPI.HandshakeResponse.newBuilder().setOk(true).build());
+    return Success.of(HandshakeAPI.HandshakeResponse.newBuilder().setOk(true).build(),
+        messageExecutionContext);
   }
 }
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/security/AuthenticationRequestOperationHandler.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/security/AuthenticationRequestOperationHandler.java
new file mode 100644
index 0000000..947563f
--- /dev/null
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/security/AuthenticationRequestOperationHandler.java
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package org.apache.geode.internal.protocol.protobuf.operations.security;
+
+import java.util.Properties;
+
+import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
+import org.apache.geode.internal.exception.InvalidExecutionContextException;
+import org.apache.geode.internal.protocol.Result;
+import org.apache.geode.internal.protocol.Success;
+import org.apache.geode.internal.protocol.operations.OperationHandler;
+import org.apache.geode.internal.protocol.protobuf.AuthenticationAPI;
+import org.apache.geode.internal.protocol.protobuf.security.processors.AuthorizationSecurityProcessor;
+import org.apache.geode.internal.protocol.security.Authenticator;
+import org.apache.geode.internal.serialization.SerializationService;
+import org.apache.geode.security.AuthenticationFailedException;
+
+public class AuthenticationRequestOperationHandler implements
+    OperationHandler<AuthenticationAPI.AuthenticationRequest, AuthenticationAPI.AuthenticationResponse> {
+  @Override
+  public Result<AuthenticationAPI.AuthenticationResponse,MessageExecutionContext> process(
+      SerializationService serializationService, AuthenticationAPI.AuthenticationRequest request,
+      MessageExecutionContext messageExecutionContext) throws InvalidExecutionContextException {
+    Authenticator authenticator = messageExecutionContext.getAuthenticator();
+    Properties properties = new Properties();
+    properties.putAll(request.getCredentialsMap());
+
+    try {
+      Object authenticationToken = authenticator.authenticate(properties);
+      MessageExecutionContext
+          newMessageExecutionContext =
+          new MessageExecutionContext(messageExecutionContext.getCache(),
+              messageExecutionContext.getAuthenticator(), messageExecutionContext.getAuthorizer(),
+              authenticationToken, messageExecutionContext.getStatistics(),
+              new AuthorizationSecurityProcessor());
+      return Success
+          .of(AuthenticationAPI.AuthenticationResponse.newBuilder().setAuthenticated(true).build(),
+              newMessageExecutionContext);
+    } catch (AuthenticationFailedException e) {
+      return Success
+          .of(AuthenticationAPI.AuthenticationResponse.newBuilder().setAuthenticated(false)
+              .build(), messageExecutionContext);
+    }
+  }
+}
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/InvalidConfigAuthenticator.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/InvalidConfigAuthenticator.java
index e924bc6..409a075 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/InvalidConfigAuthenticator.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/InvalidConfigAuthenticator.java
@@ -21,35 +21,22 @@ import java.io.OutputStream;
 
 import org.apache.geode.internal.protocol.protobuf.BasicTypes;
 import org.apache.geode.internal.protocol.protobuf.ClientProtocol;
-import org.apache.geode.internal.protocol.protobuf.ProtocolErrorCode;
+import org.apache.geode.internal.protocol.ProtocolErrorCode;
 import org.apache.logging.log4j.Logger;
 
 import org.apache.geode.internal.logging.LogService;
 import org.apache.geode.internal.protocol.security.Authenticator;
 import org.apache.geode.internal.security.SecurityService;
+import org.apache.geode.security.AuthenticationFailedException;
 
-public class InvalidConfigAuthenticator implements Authenticator {
+public class InvalidConfigAuthenticator implements Authenticator<Object, Object> {
   private static final Logger logger = LogService.getLogger(InvalidConfigAuthenticator.class);
-  private final SecurityService securityService;
-
-  public InvalidConfigAuthenticator(SecurityService securityService) {
-    this.securityService = securityService;
-  }
 
   @Override
-  public Object authenticate(InputStream inputStream, OutputStream outputStream)
-      throws IOException {
+  public Object authenticate(Object object) throws AuthenticationFailedException {
     logger.warn(
         "Attempting to authenticate incoming protobuf message using legacy security implementation. This is not supported. Failing authentication.");
-
-    ClientProtocol.Message.newBuilder()
-        .setResponse(ClientProtocol.Response.newBuilder()
-            .setErrorResponse(ClientProtocol.ErrorResponse.newBuilder()
-                .setError(BasicTypes.Error.newBuilder()
-                    .setErrorCode(ProtocolErrorCode.AUTHENTICATION_FAILED.codeValue).setMessage(
-                        "Attempting to authenticate incoming protobuf message using legacy security implementation. This is not supported. Failing authentication."))))
-        .build().writeDelimitedTo(outputStream);
-
-    throw new IOException("Protobuf clients not supported with legacy security.");
+    throw new AuthenticationFailedException(
+        "Attempting to authenticate incoming protobuf message using legacy security implementation. This is not supported. Failing authentication.");
   }
 }
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/ProtobufShiroAuthenticator.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/ProtobufShiroAuthenticator.java
index 6d6a497..cdee506 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/ProtobufShiroAuthenticator.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/ProtobufShiroAuthenticator.java
@@ -14,7 +14,7 @@
  */
 package org.apache.geode.internal.protocol.protobuf.security;
 
-import static org.apache.geode.internal.protocol.protobuf.ProtocolErrorCode.AUTHENTICATION_FAILED;
+import static org.apache.geode.internal.protocol.ProtocolErrorCode.AUTHENTICATION_FAILED;
 
 import org.apache.geode.internal.protocol.protobuf.AuthenticationAPI;
 
@@ -31,9 +31,7 @@ import java.util.Properties;
 
 import org.apache.shiro.subject.Subject;
 
-public class ProtobufShiroAuthenticator implements Authenticator {
-  private static final String UNEXECPTED_REQUEST = "Expected to receive an authentication request";
-
+public class ProtobufShiroAuthenticator implements Authenticator<Properties, Subject> {
   private final SecurityService securityService;
 
   public ProtobufShiroAuthenticator(SecurityService securityService) {
@@ -41,52 +39,7 @@ public class ProtobufShiroAuthenticator implements Authenticator {
   }
 
   @Override
-  public Subject authenticate(InputStream inputStream, OutputStream outputStream)
-      throws IOException, AuthenticationFailedException {
-    ClientProtocol.Message message = ClientProtocol.Message.parseDelimitedFrom(inputStream);
-
-    if (message.getRequest().getRequestAPICase()
-        .getNumber() != ClientProtocol.Request.SIMPLEAUTHENTICATIONREQUEST_FIELD_NUMBER) {
-      failAuth(outputStream);
-    }
-
-    AuthenticationAPI.AuthenticationRequest authenticationRequest =
-        message.getRequest().getSimpleAuthenticationRequest();
-    if (authenticationRequest == null) {
-      failAuth(outputStream);
-    }
-
-    Properties properties = new Properties();
-    properties.putAll(authenticationRequest.getCredentialsMap());
-
-    try {
-      // throws AuthenticationFailedException on failure.
-      Subject authToken = securityService.login(properties);
-
-      sendAuthenticationResponse(outputStream, true);
-      return authToken;
-    } catch (AuthenticationFailedException ex) {
-      sendAuthenticationResponse(outputStream, false);
-      throw ex;
-    }
-  }
-
-  private void sendAuthenticationResponse(OutputStream outputStream, boolean success)
-      throws IOException {
-    ClientProtocol.Message.newBuilder()
-        .setResponse(ClientProtocol.Response.newBuilder().setSimpleAuthenticationResponse(
-            AuthenticationAPI.AuthenticationResponse.newBuilder().setAuthenticated(success)))
-        .build().writeDelimitedTo(outputStream);
-  }
-
-  private void failAuth(OutputStream outputStream) throws IOException {
-    ClientProtocol.Message.newBuilder()
-        .setResponse(ClientProtocol.Response.newBuilder()
-            .setErrorResponse(ClientProtocol.ErrorResponse.newBuilder()
-                .setError(BasicTypes.Error.newBuilder()
-                    .setErrorCode(AUTHENTICATION_FAILED.codeValue).setMessage(UNEXECPTED_REQUEST))))
-        .build().writeDelimitedTo(outputStream);
-
-    throw new IOException(UNEXECPTED_REQUEST);
+  public Subject authenticate(Properties properties) throws AuthenticationFailedException {
+    return securityService.login(properties);
   }
 }
diff --git a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufTestExecutionContext.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/processors/AuthenticationSecurityProcessor.java
similarity index 53%
copy from geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufTestExecutionContext.java
copy to geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/processors/AuthenticationSecurityProcessor.java
index 43b1efa..d164222 100644
--- a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufTestExecutionContext.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/processors/AuthenticationSecurityProcessor.java
@@ -12,16 +12,19 @@
  * or implied. See the License for the specific language governing permissions and limitations under
  * the License.
  */
-package org.apache.geode.internal.protocol.protobuf;
+package org.apache.geode.internal.protocol.protobuf.security.processors;
 
-import org.apache.geode.cache.Cache;
 import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
-import org.apache.geode.internal.protocol.security.NoOpAuthorizer;
-import org.apache.geode.internal.protocol.statistics.NoOpStatistics;
+import org.apache.geode.internal.protocol.OperationContext;
+import org.apache.geode.internal.protocol.protobuf.AuthenticationAPI;
+import org.apache.geode.internal.protocol.protobuf.ClientProtocol;
+import org.apache.geode.internal.protocol.security.SecurityProcessor;
 
-public class ProtobufTestExecutionContext {
-  public static MessageExecutionContext getNoAuthExecutionContext(Cache cache) {
-    return new MessageExecutionContext(cache, new NoOpAuthorizer(), new Object(),
-        new NoOpStatistics());
+public class AuthenticationSecurityProcessor implements SecurityProcessor<ClientProtocol.Request> {
+  @Override
+  public boolean validateOperation(ClientProtocol.Request request,
+      MessageExecutionContext messageExecutionContext, OperationContext operationContext) {
+    Object fromRequest = operationContext.getFromRequest().apply(request);
+    return fromRequest instanceof AuthenticationAPI.AuthenticationRequest;
   }
 }
diff --git a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufTestExecutionContext.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/processors/AuthorizationSecurityProcessor.java
similarity index 54%
copy from geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufTestExecutionContext.java
copy to geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/processors/AuthorizationSecurityProcessor.java
index 43b1efa..7664e8a 100644
--- a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufTestExecutionContext.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/processors/AuthorizationSecurityProcessor.java
@@ -12,16 +12,19 @@
  * or implied. See the License for the specific language governing permissions and limitations under
  * the License.
  */
-package org.apache.geode.internal.protocol.protobuf;
+package org.apache.geode.internal.protocol.protobuf.security.processors;
 
-import org.apache.geode.cache.Cache;
 import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
-import org.apache.geode.internal.protocol.security.NoOpAuthorizer;
-import org.apache.geode.internal.protocol.statistics.NoOpStatistics;
+import org.apache.geode.internal.protocol.OperationContext;
+import org.apache.geode.internal.protocol.protobuf.ClientProtocol;
+import org.apache.geode.internal.protocol.security.SecurityProcessor;
 
-public class ProtobufTestExecutionContext {
-  public static MessageExecutionContext getNoAuthExecutionContext(Cache cache) {
-    return new MessageExecutionContext(cache, new NoOpAuthorizer(), new Object(),
-        new NoOpStatistics());
+public class AuthorizationSecurityProcessor implements SecurityProcessor<ClientProtocol.Request> {
+  @Override
+  public boolean validateOperation(ClientProtocol.Request request,
+      MessageExecutionContext messageExecutionContext, OperationContext operationContext) {
+    return messageExecutionContext.getAuthorizer().authorize(
+        messageExecutionContext.getAuthenticationToken(),
+        operationContext.getAccessPermissionRequired());
   }
 }
diff --git a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufTestExecutionContext.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/processors/NoAuthenticationSecurityProcessor.java
similarity index 60%
copy from geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufTestExecutionContext.java
copy to geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/processors/NoAuthenticationSecurityProcessor.java
index 43b1efa..d603b1a 100644
--- a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufTestExecutionContext.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/processors/NoAuthenticationSecurityProcessor.java
@@ -12,16 +12,18 @@
  * or implied. See the License for the specific language governing permissions and limitations under
  * the License.
  */
-package org.apache.geode.internal.protocol.protobuf;
+package org.apache.geode.internal.protocol.protobuf.security.processors;
 
-import org.apache.geode.cache.Cache;
 import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
-import org.apache.geode.internal.protocol.security.NoOpAuthorizer;
-import org.apache.geode.internal.protocol.statistics.NoOpStatistics;
+import org.apache.geode.internal.protocol.OperationContext;
+import org.apache.geode.internal.protocol.protobuf.ClientProtocol;
+import org.apache.geode.internal.protocol.security.SecurityProcessor;
 
-public class ProtobufTestExecutionContext {
-  public static MessageExecutionContext getNoAuthExecutionContext(Cache cache) {
-    return new MessageExecutionContext(cache, new NoOpAuthorizer(), new Object(),
-        new NoOpStatistics());
+public class NoAuthenticationSecurityProcessor
+    implements SecurityProcessor<ClientProtocol.Request> {
+  @Override
+  public boolean validateOperation(ClientProtocol.Request request,
+      MessageExecutionContext messageExecutionContext, OperationContext operationContext) {
+    return true;
   }
 }
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/utilities/ProtobufResponseUtilities.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/utilities/ProtobufResponseUtilities.java
index 6819d8b..663c31e 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/utilities/ProtobufResponseUtilities.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/utilities/ProtobufResponseUtilities.java
@@ -16,14 +16,12 @@ package org.apache.geode.internal.protocol.protobuf.utilities;
 
 import java.util.Set;
 
-import org.apache.logging.log4j.Logger;
-
 import org.apache.geode.annotations.Experimental;
 import org.apache.geode.cache.Region;
 import org.apache.geode.internal.protocol.protobuf.BasicTypes;
 import org.apache.geode.internal.protocol.protobuf.ClientProtocol;
 import org.apache.geode.internal.protocol.protobuf.RegionAPI;
-import org.apache.geode.internal.protocol.protobuf.ProtocolErrorCode;
+import org.apache.geode.internal.protocol.ProtocolErrorCode;
 
 
 /**
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/utilities/ProtobufUtilities.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/utilities/ProtobufUtilities.java
index 320a10c..1053f64 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/utilities/ProtobufUtilities.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/utilities/ProtobufUtilities.java
@@ -21,7 +21,7 @@ import org.apache.geode.cache.Region;
 import org.apache.geode.cache.RegionAttributes;
 import org.apache.geode.internal.protocol.protobuf.BasicTypes;
 import org.apache.geode.internal.protocol.protobuf.ClientProtocol;
-import org.apache.geode.internal.protocol.protobuf.EncodingTypeTranslator;
+import org.apache.geode.internal.protocol.EncodingTypeTranslator;
 import org.apache.geode.internal.protocol.protobuf.ProtobufSerializationService;
 import org.apache.geode.internal.protocol.protobuf.RegionAPI;
 import org.apache.geode.internal.protocol.protobuf.utilities.exception.UnknownProtobufPrimitiveType;
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/registry/OperationContextRegistry.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/registry/OperationContextRegistry.java
index dbf6259..e18a81b 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/registry/OperationContextRegistry.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/registry/OperationContextRegistry.java
@@ -21,7 +21,7 @@ import java.util.concurrent.ConcurrentHashMap;
 import org.apache.geode.annotations.Experimental;
 import org.apache.geode.internal.protocol.protobuf.ClientProtocol;
 import org.apache.geode.internal.protocol.protobuf.ClientProtocol.Request.RequestAPICase;
-import org.apache.geode.internal.protocol.protobuf.OperationContext;
+import org.apache.geode.internal.protocol.OperationContext;
 import org.apache.geode.internal.protocol.protobuf.operations.GetAllRequestOperationHandler;
 import org.apache.geode.internal.protocol.protobuf.operations.GetAvailableServersOperationHandler;
 import org.apache.geode.internal.protocol.protobuf.operations.GetRegionNamesRequestOperationHandler;
@@ -30,6 +30,7 @@ import org.apache.geode.internal.protocol.protobuf.operations.GetRequestOperatio
 import org.apache.geode.internal.protocol.protobuf.operations.PutAllRequestOperationHandler;
 import org.apache.geode.internal.protocol.protobuf.operations.PutRequestOperationHandler;
 import org.apache.geode.internal.protocol.protobuf.operations.RemoveRequestOperationHandler;
+import org.apache.geode.internal.protocol.protobuf.operations.security.AuthenticationRequestOperationHandler;
 import org.apache.geode.security.ResourcePermission;
 
 @Experimental
@@ -45,6 +46,13 @@ public class OperationContextRegistry {
   }
 
   private void addContexts() {
+    operationContexts.put(RequestAPICase.AUTHENTICATIONREQUEST,
+        new OperationContext<>(ClientProtocol.Request::getAuthenticationRequest,
+            new AuthenticationRequestOperationHandler(),
+            opsResp -> ClientProtocol.Response.newBuilder().setAuthenticationResponse(opsResp),
+            new ResourcePermission(ResourcePermission.Resource.DATA,
+                ResourcePermission.Operation.READ)));
+
     operationContexts.put(RequestAPICase.GETREQUEST,
         new OperationContext<>(ClientProtocol.Request::getGetRequest,
             new GetRequestOperationHandler(),
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/security/AuthenticationLookupService.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/security/AuthenticationLookupService.java
index f61a300..5d3f04d 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/security/AuthenticationLookupService.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/security/AuthenticationLookupService.java
@@ -26,7 +26,7 @@ public class AuthenticationLookupService {
     }
     if (securityService.isPeerSecurityRequired() || securityService.isClientSecurityRequired()) {
       // Failing authentication...legacy security
-      return new InvalidConfigAuthenticator(securityService);
+      return new InvalidConfigAuthenticator();
     } else {
       // Noop authenticator...no security
       return new NoOpAuthenticator();
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/security/Authenticator.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/security/Authenticator.java
index f4234cd..42dd22b 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/security/Authenticator.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/security/Authenticator.java
@@ -14,13 +14,7 @@
  */
 package org.apache.geode.internal.protocol.security;
 
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import org.apache.geode.internal.security.SecurityService;
 import org.apache.geode.security.AuthenticationFailedException;
-import org.apache.geode.security.AuthenticationRequiredException;
 
 /**
  * Implementers of this interface do some message passing over a socket to authenticate a client,
@@ -29,14 +23,12 @@ import org.apache.geode.security.AuthenticationRequiredException;
  * If authentication fails, an implementor may continue to wait for another valid authentication
  * exchange.
  */
-public interface Authenticator {
+public interface Authenticator<SecurityProperties, AuthenticationToken> {
   /**
-   *
-   * @param inputStream to read auth messages from.
-   * @param outputStream to send messages to.
+   * @param securityProperties a generic object that is required for authentication dependent on
+   *        implementation
    * @return authenticated principal
-   * @throws IOException if EOF or if invalid input is received.
    */
-  Object authenticate(InputStream inputStream, OutputStream outputStream)
-      throws IOException, AuthenticationFailedException;
+  AuthenticationToken authenticate(SecurityProperties securityProperties)
+      throws AuthenticationFailedException;
 }
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/security/NoOpAuthenticator.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/security/NoOpAuthenticator.java
index d4f96e4..9cdeb6e 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/security/NoOpAuthenticator.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/security/NoOpAuthenticator.java
@@ -19,16 +19,16 @@ import java.io.InputStream;
 import java.io.OutputStream;
 
 import org.apache.geode.internal.security.SecurityService;
+import org.apache.geode.security.AuthenticationFailedException;
 
 /**
  * An implementation of {@link Authenticator} that doesn't use its parameters and always returns
  * true.
  */
-public class NoOpAuthenticator implements Authenticator {
+public class NoOpAuthenticator implements Authenticator<Object, Object> {
+
   @Override
-  public Object authenticate(InputStream inputStream, OutputStream outputStream)
-      throws IOException {
-    // this method needs to do nothing as it is a pass-through implementation
+  public Object authenticate(Object inputObject) throws AuthenticationFailedException {
     return new Object();
   }
 }
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/Result.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/security/SecurityProcessor.java
similarity index 67%
rename from geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/Result.java
rename to geode-protobuf/src/main/java/org/apache/geode/internal/protocol/security/SecurityProcessor.java
index bada098..40d5e9e 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/Result.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/security/SecurityProcessor.java
@@ -12,18 +12,12 @@
  * or implied. See the License for the specific language governing permissions and limitations under
  * the License.
  */
-package org.apache.geode.internal.protocol.protobuf;
+package org.apache.geode.internal.protocol.security;
 
-import java.util.function.Function;
+import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
+import org.apache.geode.internal.protocol.OperationContext;
 
-import org.apache.geode.annotations.Experimental;
-
-@Experimental
-public interface Result<SuccessType> {
-  <T> T map(Function<SuccessType, T> successFunction,
-      Function<ClientProtocol.ErrorResponse, T> errorFunction);
-
-  SuccessType getMessage();
-
-  ClientProtocol.ErrorResponse getErrorMessage();
+public interface SecurityProcessor<RequestMessage> {
+  boolean validateOperation(RequestMessage request, MessageExecutionContext messageExecutionContext,
+      OperationContext operationContext);
 }
diff --git a/geode-protobuf/src/main/proto/clientProtocol.proto b/geode-protobuf/src/main/proto/clientProtocol.proto
index b4c0f56..4d8b94a 100644
--- a/geode-protobuf/src/main/proto/clientProtocol.proto
+++ b/geode-protobuf/src/main/proto/clientProtocol.proto
@@ -48,7 +48,7 @@ message Request {
         GetRegionNamesRequest getRegionNamesRequest = 43;
         GetRegionRequest getRegionRequest = 44;
 
-        AuthenticationRequest simpleAuthenticationRequest = 100;
+        AuthenticationRequest authenticationRequest = 100;
     }
 }
 
@@ -67,7 +67,7 @@ message Response {
         GetRegionNamesResponse getRegionNamesResponse = 43;
         GetRegionResponse getRegionResponse = 44;
 
-        AuthenticationResponse simpleAuthenticationResponse = 100;
+        AuthenticationResponse authenticationResponse = 100;
     }
 }
 
diff --git a/geode-protobuf/src/main/proto/handshake_API.proto b/geode-protobuf/src/main/proto/handshake_API.proto
index 17f7d40..b11ae03 100644
--- a/geode-protobuf/src/main/proto/handshake_API.proto
+++ b/geode-protobuf/src/main/proto/handshake_API.proto
@@ -31,4 +31,9 @@ message HandshakeRequest {
 message HandshakeResponse {
     bool ok = 1;
     Error error = 2; // only set if not OK.
+}
+
+message Semver{
+    int32 major = 1;
+    int32 minor = 2;
 }
\ No newline at end of file
diff --git a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/AuthenticationIntegrationTest.java b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/AuthenticationIntegrationTest.java
index adbe906..124abbb 100644
--- a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/AuthenticationIntegrationTest.java
+++ b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/AuthenticationIntegrationTest.java
@@ -15,7 +15,7 @@
 package org.apache.geode.internal.protocol;
 
 import static junit.framework.TestCase.fail;
-import static org.apache.geode.internal.protocol.protobuf.ProtocolErrorCode.AUTHENTICATION_FAILED;
+import static org.apache.geode.internal.protocol.ProtocolErrorCode.AUTHENTICATION_FAILED;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
@@ -29,7 +29,6 @@ import java.net.Socket;
 import java.util.Properties;
 import java.util.concurrent.TimeUnit;
 
-import org.apache.geode.internal.protocol.exception.InvalidProtocolMessageException;
 import org.awaitility.Awaitility;
 import org.junit.After;
 import org.junit.Before;
@@ -204,7 +203,7 @@ public class AuthenticationIntegrationTest {
 
     ClientProtocol.Message authenticationRequest = ClientProtocol.Message.newBuilder()
         .setRequest(ClientProtocol.Request.newBuilder()
-            .setSimpleAuthenticationRequest(AuthenticationAPI.AuthenticationRequest.newBuilder()
+            .setAuthenticationRequest(AuthenticationAPI.AuthenticationRequest.newBuilder()
                 .putCredentials(ResourceConstants.USER_NAME, TEST_USERNAME)
                 .putCredentials(ResourceConstants.PASSWORD, TEST_PASSWORD)))
         .build();
@@ -232,7 +231,7 @@ public class AuthenticationIntegrationTest {
 
     ClientProtocol.Message authenticationRequest = ClientProtocol.Message.newBuilder()
         .setRequest(ClientProtocol.Request.newBuilder()
-            .setSimpleAuthenticationRequest(AuthenticationAPI.AuthenticationRequest.newBuilder()))
+            .setAuthenticationRequest(AuthenticationAPI.AuthenticationRequest.newBuilder()))
         .build();
 
     authenticationRequest.writeDelimitedTo(outputStream);
@@ -249,7 +248,7 @@ public class AuthenticationIntegrationTest {
 
     ClientProtocol.Message authenticationRequest = ClientProtocol.Message.newBuilder()
         .setRequest(ClientProtocol.Request.newBuilder()
-            .setSimpleAuthenticationRequest(AuthenticationAPI.AuthenticationRequest.newBuilder()
+            .setAuthenticationRequest(AuthenticationAPI.AuthenticationRequest.newBuilder()
                 .putCredentials(ResourceConstants.USER_NAME, TEST_USERNAME)
                 .putCredentials(ResourceConstants.PASSWORD, "wrong password")))
         .build();
@@ -279,7 +278,7 @@ public class AuthenticationIntegrationTest {
 
     ClientProtocol.Message authenticationRequest = ClientProtocol.Message.newBuilder()
         .setRequest(ClientProtocol.Request.newBuilder()
-            .setSimpleAuthenticationRequest(AuthenticationAPI.AuthenticationRequest.newBuilder()))
+            .setAuthenticationRequest(AuthenticationAPI.AuthenticationRequest.newBuilder()))
         .build();
 
     authenticationRequest.writeDelimitedTo(outputStream);
@@ -298,7 +297,7 @@ public class AuthenticationIntegrationTest {
 
     ClientProtocol.Message authenticationRequest = ClientProtocol.Message.newBuilder()
         .setRequest(ClientProtocol.Request.newBuilder()
-            .setSimpleAuthenticationRequest(AuthenticationAPI.AuthenticationRequest.newBuilder()))
+            .setAuthenticationRequest(AuthenticationAPI.AuthenticationRequest.newBuilder()))
         .build();
 
     authenticationRequest.writeDelimitedTo(outputStream);
@@ -332,8 +331,8 @@ public class AuthenticationIntegrationTest {
         ClientProtocol.Message.parseDelimitedFrom(inputStream);
     assertEquals(ClientProtocol.Message.RESPONSE_FIELD_NUMBER,
         authenticationResponseMessage.getMessageTypeCase().getNumber());
-    assertEquals(ClientProtocol.Response.SIMPLEAUTHENTICATIONRESPONSE_FIELD_NUMBER,
+    assertEquals(ClientProtocol.Response.AUTHENTICATIONRESPONSE_FIELD_NUMBER,
         authenticationResponseMessage.getResponse().getResponseAPICase().getNumber());
-    return authenticationResponseMessage.getResponse().getSimpleAuthenticationResponse();
+    return authenticationResponseMessage.getResponse().getAuthenticationResponse();
   }
 }
diff --git a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/AuthorizationIntegrationTest.java b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/AuthorizationIntegrationTest.java
index b41b93c..109e10d 100644
--- a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/AuthorizationIntegrationTest.java
+++ b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/AuthorizationIntegrationTest.java
@@ -43,7 +43,6 @@ import org.apache.geode.internal.AvailablePortHelper;
 import org.apache.geode.internal.protocol.protobuf.AuthenticationAPI;
 import org.apache.geode.internal.protocol.protobuf.ClientProtocol;
 import org.apache.geode.internal.protocol.protobuf.ProtobufSerializationService;
-import org.apache.geode.internal.protocol.protobuf.ProtocolErrorCode;
 import org.apache.geode.internal.protocol.protobuf.RegionAPI;
 import org.apache.geode.internal.protocol.protobuf.serializer.ProtobufProtocolSerializer;
 import org.apache.geode.internal.protocol.protobuf.utilities.ProtobufUtilities;
@@ -116,7 +115,7 @@ public class AuthorizationIntegrationTest {
     when(mockSecurityManager.authorize(same(securityPrincipal), any())).thenReturn(false);
     ClientProtocol.Message authenticationRequest = ClientProtocol.Message.newBuilder()
         .setRequest(ClientProtocol.Request.newBuilder()
-            .setSimpleAuthenticationRequest(AuthenticationAPI.AuthenticationRequest.newBuilder()
+            .setAuthenticationRequest(AuthenticationAPI.AuthenticationRequest.newBuilder()
                 .putCredentials(ResourceConstants.USER_NAME, TEST_USERNAME)
                 .putCredentials(ResourceConstants.PASSWORD, TEST_PASSWORD)))
         .build();
@@ -125,10 +124,10 @@ public class AuthorizationIntegrationTest {
     ClientProtocol.Message responseMessage = ClientProtocol.Message.parseDelimitedFrom(inputStream);
     assertEquals(ClientProtocol.Message.RESPONSE_FIELD_NUMBER,
         responseMessage.getMessageTypeCase().getNumber());
-    assertEquals(ClientProtocol.Response.SIMPLEAUTHENTICATIONRESPONSE_FIELD_NUMBER,
+    assertEquals(ClientProtocol.Response.AUTHENTICATIONRESPONSE_FIELD_NUMBER,
         responseMessage.getResponse().getResponseAPICase().getNumber());
     AuthenticationAPI.AuthenticationResponse authenticationResponse =
-        responseMessage.getResponse().getSimpleAuthenticationResponse();
+        responseMessage.getResponse().getAuthenticationResponse();
     assertTrue(authenticationResponse.getAuthenticated());
   }
 
diff --git a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/acceptance/LocatorConnectionDUnitTest.java b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/acceptance/LocatorConnectionDUnitTest.java
index 01dac04..3d239b5 100644
--- a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/acceptance/LocatorConnectionDUnitTest.java
+++ b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/acceptance/LocatorConnectionDUnitTest.java
@@ -37,11 +37,10 @@ import org.apache.geode.distributed.internal.InternalDistributedSystem;
 import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.internal.protocol.exception.InvalidProtocolMessageException;
 import org.apache.geode.internal.protocol.protobuf.ClientProtocol;
-import org.apache.geode.internal.protocol.protobuf.ProtocolErrorCode;
+import org.apache.geode.internal.protocol.ProtocolErrorCode;
 import org.apache.geode.internal.protocol.protobuf.ServerAPI;
 import org.apache.geode.internal.protocol.protobuf.serializer.ProtobufProtocolSerializer;
 import org.apache.geode.internal.protocol.protobuf.statistics.ProtobufClientStatisticsImpl;
-import org.apache.geode.internal.protocol.statistics.ProtocolClientStatistics;
 import org.apache.geode.internal.protocol.protobuf.utilities.ProtobufRequestUtilities;
 import org.apache.geode.internal.protocol.protobuf.utilities.ProtobufUtilities;
 import org.apache.geode.test.dunit.DistributedTestUtils;
diff --git a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/EncodingTypeToSerializationTypeTranslatorJUnitTest.java b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/EncodingTypeToSerializationTypeTranslatorJUnitTest.java
index 883b0f6..0a67aff 100644
--- a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/EncodingTypeToSerializationTypeTranslatorJUnitTest.java
+++ b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/EncodingTypeToSerializationTypeTranslatorJUnitTest.java
@@ -19,6 +19,7 @@ import static org.junit.Assert.assertSame;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
+import org.apache.geode.internal.protocol.EncodingTypeTranslator;
 import org.apache.geode.internal.serialization.SerializationType;
 import org.apache.geode.internal.serialization.exception.UnsupportedEncodingTypeException;
 import org.apache.geode.test.junit.categories.UnitTest;
diff --git a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/HandshakerTest.java b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/HandshakerTest.java
index 6eba760..10bfeaf 100644
--- a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/HandshakerTest.java
+++ b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/HandshakerTest.java
@@ -23,18 +23,15 @@ import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
-import java.util.HashMap;
 import java.util.Map;
 
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import org.apache.geode.cache.IncompatibleVersionException;
+import org.apache.geode.internal.protocol.Handshaker;
 import org.apache.geode.internal.protocol.security.Authenticator;
-import org.apache.geode.internal.protocol.security.Authorizer;
 import org.apache.geode.security.AuthenticationFailedException;
-import org.apache.geode.security.AuthenticationRequiredException;
 import org.apache.geode.test.junit.categories.UnitTest;
 
 @Category(UnitTest.class)
@@ -45,9 +42,9 @@ public class HandshakerTest {
 
   private static class AuthenticatorMock implements Authenticator {
 
+
     @Override
-    public Object authenticate(InputStream inputStream, OutputStream outputStream)
-        throws IOException, AuthenticationFailedException {
+    public Object authenticate(Object o) throws AuthenticationFailedException {
       return null;
     }
   }
@@ -67,8 +64,7 @@ public class HandshakerTest {
   @Test
   public void version1_0IsSupported() throws Exception {
     HandshakeAPI.HandshakeRequest handshakeRequest = HandshakeAPI.HandshakeRequest.newBuilder()
-        .setVersion(HandshakeAPI.Semver.newBuilder().setMajor(1).setMinor(1))
-        .setAuthenticationMode(HandshakeAPI.AuthenticationMode.SIMPLE).build();
+        .setVersion(HandshakeAPI.Semver.newBuilder().setMajor(1).setMinor(1)).build();
 
     ByteArrayInputStream byteArrayInputStream =
         ProtobufTestUtilities.messageToByteArrayInputStream(handshakeRequest);
@@ -85,7 +81,7 @@ public class HandshakerTest {
   public void version2NotSupported() throws Exception {
     HandshakeAPI.HandshakeRequest handshakeRequest = HandshakeAPI.HandshakeRequest.newBuilder()
         .setVersion(HandshakeAPI.Semver.newBuilder().setMajor(2).setMinor(0))
-        .setAuthenticationMode(HandshakeAPI.AuthenticationMode.NONE).build();
+        .build();
 
     ByteArrayInputStream byteArrayInputStream =
         ProtobufTestUtilities.messageToByteArrayInputStream(handshakeRequest);
@@ -99,7 +95,7 @@ public class HandshakerTest {
   public void bogusAuthenticationMode() throws Exception {
     HandshakeAPI.HandshakeRequest handshakeRequest = HandshakeAPI.HandshakeRequest.newBuilder()
         .setVersion(HandshakeAPI.Semver.newBuilder().setMajor(1).setMinor(0))
-        .setAuthenticationModeValue(-1).build();
+        .build();
 
     ByteArrayInputStream byteArrayInputStream =
         ProtobufTestUtilities.messageToByteArrayInputStream(handshakeRequest);
@@ -113,7 +109,7 @@ public class HandshakerTest {
   public void simpleIsSupported() throws Exception {
     HandshakeAPI.HandshakeRequest handshakeRequest = HandshakeAPI.HandshakeRequest.newBuilder()
         .setVersion(HandshakeAPI.Semver.newBuilder().setMajor(1).setMinor(0))
-        .setAuthenticationMode(HandshakeAPI.AuthenticationMode.SIMPLE).build();
+        .build();
 
     ByteArrayInputStream byteArrayInputStream =
         ProtobufTestUtilities.messageToByteArrayInputStream(handshakeRequest);
diff --git a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufShiroAuthenticatorJUnitTest.java b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufShiroAuthenticatorJUnitTest.java
index 419d9fe..9b0ea9d 100644
--- a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufShiroAuthenticatorJUnitTest.java
+++ b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufShiroAuthenticatorJUnitTest.java
@@ -16,6 +16,7 @@
 package org.apache.geode.internal.protocol.protobuf;
 
 import static junit.framework.TestCase.fail;
+import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
@@ -52,7 +53,7 @@ public class ProtobufShiroAuthenticatorJUnitTest {
   public void setUp() throws IOException {
     ClientProtocol.Message basicAuthenticationRequest = ClientProtocol.Message.newBuilder()
         .setRequest(ClientProtocol.Request.newBuilder()
-            .setSimpleAuthenticationRequest(AuthenticationAPI.AuthenticationRequest.newBuilder()
+            .setAuthenticationRequest(AuthenticationAPI.AuthenticationRequest.newBuilder()
                 .putCredentials(ResourceConstants.USER_NAME, TEST_USERNAME)
                 .putCredentials(ResourceConstants.PASSWORD, TEST_PASSWORD)))
         .build();
@@ -75,12 +76,14 @@ public class ProtobufShiroAuthenticatorJUnitTest {
 
   @Test
   public void successfulAuthentication() throws IOException {
-    protobufShiroAuthenticator.authenticate(byteArrayInputStream, byteArrayOutputStream);
 
-    AuthenticationAPI.AuthenticationResponse authenticationResponse =
-        getSimpleAuthenticationResponse(byteArrayOutputStream);
+    Properties properties = new Properties();
+    properties.setProperty(ResourceConstants.USER_NAME, TEST_USERNAME);
+    properties.setProperty(ResourceConstants.PASSWORD, TEST_PASSWORD);
 
-    assertTrue(authenticationResponse.getAuthenticated());
+    Subject authenticate = protobufShiroAuthenticator.authenticate(properties);
+
+    assertNotNull(authenticate);
   }
 
   @Test(expected = AuthenticationFailedException.class)
@@ -88,7 +91,11 @@ public class ProtobufShiroAuthenticatorJUnitTest {
     when(mockSecurityService.login(expectedAuthProperties))
         .thenThrow(new AuthenticationFailedException("BOOM!"));
 
-    protobufShiroAuthenticator.authenticate(byteArrayInputStream, byteArrayOutputStream);
+    Properties properties = new Properties();
+    properties.setProperty(ResourceConstants.USER_NAME, TEST_USERNAME);
+    properties.setProperty(ResourceConstants.PASSWORD, TEST_PASSWORD);
+
+    protobufShiroAuthenticator.authenticate(properties);
   }
 
   @Test
@@ -97,18 +104,12 @@ public class ProtobufShiroAuthenticatorJUnitTest {
     when(mockSecurityService.isClientSecurityRequired()).thenReturn(false);
     when(mockSecurityService.isPeerSecurityRequired()).thenReturn(false);
 
-    protobufShiroAuthenticator.authenticate(byteArrayInputStream, byteArrayOutputStream);
+    Properties properties = new Properties();
+    properties.setProperty(ResourceConstants.USER_NAME, TEST_USERNAME);
+    properties.setProperty(ResourceConstants.PASSWORD, TEST_PASSWORD);
 
-    AuthenticationAPI.AuthenticationResponse authenticationResponse =
-        getSimpleAuthenticationResponse(byteArrayOutputStream);
-
-    assertTrue(authenticationResponse.getAuthenticated());
-  }
+    Subject authenticate = protobufShiroAuthenticator.authenticate(properties);
 
-  private AuthenticationAPI.AuthenticationResponse getSimpleAuthenticationResponse(
-      ByteArrayOutputStream outputStream) throws IOException {
-    ByteArrayInputStream responseStream = new ByteArrayInputStream(outputStream.toByteArray());
-    return ClientProtocol.Message.parseDelimitedFrom(responseStream).getResponse()
-        .getSimpleAuthenticationResponse();
+    assertNotNull(authenticate);
   }
 }
diff --git a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufStreamProcessorTest.java b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufStreamProcessorTest.java
index a9578ff..e4be893 100644
--- a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufStreamProcessorTest.java
+++ b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufStreamProcessorTest.java
@@ -16,9 +16,12 @@ package org.apache.geode.internal.protocol.protobuf;
 
 import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
+import org.apache.geode.internal.protocol.protobuf.security.processors.NoAuthenticationSecurityProcessor;
+import org.apache.geode.internal.protocol.security.NoOpAuthenticator;
 import org.apache.geode.internal.protocol.security.NoOpAuthorizer;
 import org.apache.geode.internal.protocol.statistics.NoOpStatistics;
 import org.apache.geode.test.junit.categories.UnitTest;
+
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
@@ -40,6 +43,7 @@ public class ProtobufStreamProcessorTest {
     ProtobufStreamProcessor protobufStreamProcessor = new ProtobufStreamProcessor();
     InternalCache mockInternalCache = mock(InternalCache.class);
     protobufStreamProcessor.receiveMessage(inputStream, outputStream, new MessageExecutionContext(
-        mockInternalCache, new NoOpAuthorizer(), new Object(), new NoOpStatistics()));
+        mockInternalCache, new NoOpAuthenticator(), new NoOpAuthorizer(), new Object(),
+        new NoOpStatistics(), new NoAuthenticationSecurityProcessor()));
   }
 }
diff --git a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufTestExecutionContext.java b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufTestExecutionContext.java
index 43b1efa..1781865 100644
--- a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufTestExecutionContext.java
+++ b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufTestExecutionContext.java
@@ -16,12 +16,14 @@ package org.apache.geode.internal.protocol.protobuf;
 
 import org.apache.geode.cache.Cache;
 import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
+import org.apache.geode.internal.protocol.protobuf.security.processors.NoAuthenticationSecurityProcessor;
+import org.apache.geode.internal.protocol.security.NoOpAuthenticator;
 import org.apache.geode.internal.protocol.security.NoOpAuthorizer;
 import org.apache.geode.internal.protocol.statistics.NoOpStatistics;
 
 public class ProtobufTestExecutionContext {
   public static MessageExecutionContext getNoAuthExecutionContext(Cache cache) {
-    return new MessageExecutionContext(cache, new NoOpAuthorizer(), new Object(),
-        new NoOpStatistics());
+    return new MessageExecutionContext(cache, new NoOpAuthenticator(), new NoOpAuthorizer(), new Object(),
+        new NoOpStatistics(), new NoAuthenticationSecurityProcessor());
   }
 }
diff --git a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufTestUtilities.java b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufTestUtilities.java
index 827599f..9a767fd 100644
--- a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufTestUtilities.java
+++ b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufTestUtilities.java
@@ -55,6 +55,6 @@ public class ProtobufTestUtilities {
       HandshakeAPI.AuthenticationMode authenticationMode) {
     return HandshakeAPI.HandshakeRequest.newBuilder()
         .setVersion(HandshakeAPI.Semver.newBuilder().setMajor(1).setMinor(0))
-        .setAuthenticationMode(authenticationMode).build();
+        .build();
   }
 }
diff --git a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/GetAllRequestOperationHandlerJUnitTest.java b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/GetAllRequestOperationHandlerJUnitTest.java
index 86ad5af..40b8a7c 100644
--- a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/GetAllRequestOperationHandlerJUnitTest.java
+++ b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/GetAllRequestOperationHandlerJUnitTest.java
@@ -33,12 +33,13 @@ import org.junit.experimental.categories.Category;
 
 import org.apache.geode.cache.CacheLoaderException;
 import org.apache.geode.cache.Region;
+import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
 import org.apache.geode.internal.exception.InvalidExecutionContextException;
 import org.apache.geode.internal.protocol.protobuf.BasicTypes;
 import org.apache.geode.internal.protocol.protobuf.ProtobufTestExecutionContext;
 import org.apache.geode.internal.protocol.protobuf.RegionAPI;
-import org.apache.geode.internal.protocol.protobuf.Result;
-import org.apache.geode.internal.protocol.protobuf.Success;
+import org.apache.geode.internal.protocol.Result;
+import org.apache.geode.internal.protocol.Success;
 import org.apache.geode.internal.protocol.protobuf.utilities.ProtobufRequestUtilities;
 import org.apache.geode.internal.protocol.protobuf.utilities.ProtobufUtilities;
 import org.apache.geode.internal.serialization.exception.UnsupportedEncodingTypeException;
@@ -76,7 +77,7 @@ public class GetAllRequestOperationHandlerJUnitTest extends OperationHandlerJUni
 
   @Test
   public void processReturnsExpectedValuesForValidKeys() throws Exception {
-    Result<RegionAPI.GetAllResponse> result =
+    Result<RegionAPI.GetAllResponse,MessageExecutionContext> result =
         operationHandler.process(serializationServiceStub, generateTestRequest(true, false),
             ProtobufTestExecutionContext.getNoAuthExecutionContext(cacheStub));
 
@@ -97,7 +98,7 @@ public class GetAllRequestOperationHandlerJUnitTest extends OperationHandlerJUni
   @Test
   public void processReturnsNoEntriesForNoKeysRequested() throws UnsupportedEncodingTypeException,
       CodecNotRegisteredForTypeException, InvalidExecutionContextException {
-    Result<RegionAPI.GetAllResponse> result =
+    Result<RegionAPI.GetAllResponse,MessageExecutionContext> result =
         operationHandler.process(serializationServiceStub, generateTestRequest(false, false),
             ProtobufTestExecutionContext.getNoAuthExecutionContext(cacheStub));
 
@@ -115,7 +116,7 @@ public class GetAllRequestOperationHandlerJUnitTest extends OperationHandlerJUni
         NO_VALUE_PRESENT_FOR_THIS_KEY));
     RegionAPI.GetAllRequest getAllRequest =
         ProtobufRequestUtilities.createGetAllRequest(TEST_REGION, testKeys);
-    Result<RegionAPI.GetAllResponse> result = operationHandler.process(serializationServiceStub,
+    Result<RegionAPI.GetAllResponse,MessageExecutionContext> result = operationHandler.process(serializationServiceStub,
         getAllRequest, ProtobufTestExecutionContext.getNoAuthExecutionContext(cacheStub));
 
     assertTrue(result instanceof Success);
@@ -130,7 +131,7 @@ public class GetAllRequestOperationHandlerJUnitTest extends OperationHandlerJUni
   @Test
   public void multipleKeysWhereOneThrows() throws UnsupportedEncodingTypeException,
       CodecNotRegisteredForTypeException, InvalidExecutionContextException {
-    Result<RegionAPI.GetAllResponse> result =
+    Result<RegionAPI.GetAllResponse,MessageExecutionContext> result =
         operationHandler.process(serializationServiceStub, generateTestRequest(true, true),
             ProtobufTestExecutionContext.getNoAuthExecutionContext(cacheStub));
 
diff --git a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/GetAvailableServersOperationHandlerJUnitTest.java b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/GetAvailableServersOperationHandlerJUnitTest.java
index 393fab8..418191d 100644
--- a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/GetAvailableServersOperationHandlerJUnitTest.java
+++ b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/GetAvailableServersOperationHandlerJUnitTest.java
@@ -21,10 +21,10 @@ import org.apache.geode.distributed.internal.ServerLocator;
 import org.apache.geode.internal.exception.InvalidExecutionContextException;
 import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
 import org.apache.geode.internal.protocol.protobuf.BasicTypes;
-import org.apache.geode.internal.protocol.protobuf.Result;
+import org.apache.geode.internal.protocol.Result;
 import org.apache.geode.internal.protocol.protobuf.ServerAPI;
 import org.apache.geode.internal.protocol.protobuf.ServerAPI.GetAvailableServersResponse;
-import org.apache.geode.internal.protocol.protobuf.Success;
+import org.apache.geode.internal.protocol.Success;
 import org.apache.geode.internal.protocol.statistics.NoOpStatistics;
 import org.apache.geode.internal.protocol.protobuf.utilities.ProtobufRequestUtilities;
 import org.apache.geode.test.junit.categories.UnitTest;
diff --git a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/GetRegionNamesRequestOperationHandlerJUnitTest.java b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/GetRegionNamesRequestOperationHandlerJUnitTest.java
index 3c0c913..ba42f63 100644
--- a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/GetRegionNamesRequestOperationHandlerJUnitTest.java
+++ b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/GetRegionNamesRequestOperationHandlerJUnitTest.java
@@ -29,10 +29,11 @@ import org.junit.experimental.categories.Category;
 
 import org.apache.geode.cache.Cache;
 import org.apache.geode.cache.Region;
+import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
 import org.apache.geode.internal.exception.InvalidExecutionContextException;
 import org.apache.geode.internal.protocol.protobuf.RegionAPI;
-import org.apache.geode.internal.protocol.protobuf.Result;
-import org.apache.geode.internal.protocol.protobuf.Success;
+import org.apache.geode.internal.protocol.Result;
+import org.apache.geode.internal.protocol.Success;
 import org.apache.geode.internal.protocol.protobuf.utilities.ProtobufRequestUtilities;
 import org.apache.geode.internal.serialization.exception.UnsupportedEncodingTypeException;
 import org.apache.geode.internal.serialization.registry.exception.CodecNotRegisteredForTypeException;
@@ -63,7 +64,7 @@ public class GetRegionNamesRequestOperationHandlerJUnitTest extends OperationHan
   @Test
   public void processReturnsCacheRegions() throws UnsupportedEncodingTypeException,
       CodecNotRegisteredForTypeException, InvalidExecutionContextException {
-    Result<RegionAPI.GetRegionNamesResponse> result = operationHandler.process(
+    Result<RegionAPI.GetRegionNamesResponse,MessageExecutionContext> result = operationHandler.process(
         serializationServiceStub, ProtobufRequestUtilities.createGetRegionNamesRequest(),
         getNoAuthExecutionContext(cacheStub));
     Assert.assertTrue(result instanceof Success);
@@ -87,7 +88,7 @@ public class GetRegionNamesRequestOperationHandlerJUnitTest extends OperationHan
     Cache emptyCache = mock(Cache.class);;
     when(emptyCache.rootRegions())
         .thenReturn(Collections.unmodifiableSet(new HashSet<Region<String, String>>()));
-    Result<RegionAPI.GetRegionNamesResponse> result = operationHandler.process(
+    Result<RegionAPI.GetRegionNamesResponse,MessageExecutionContext> result = operationHandler.process(
         serializationServiceStub, ProtobufRequestUtilities.createGetRegionNamesRequest(),
         getNoAuthExecutionContext(emptyCache));
     Assert.assertTrue(result instanceof Success);
diff --git a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/GetRegionRequestOperationHandlerJUnitTest.java b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/GetRegionRequestOperationHandlerJUnitTest.java
index 2e7979c..f2aebb5 100644
--- a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/GetRegionRequestOperationHandlerJUnitTest.java
+++ b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/GetRegionRequestOperationHandlerJUnitTest.java
@@ -31,13 +31,14 @@ import org.apache.geode.cache.DataPolicy;
 import org.apache.geode.cache.Region;
 import org.apache.geode.cache.RegionAttributes;
 import org.apache.geode.cache.Scope;
+import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
 import org.apache.geode.internal.protocol.MessageUtil;
 import org.apache.geode.internal.protocol.protobuf.BasicTypes;
 import org.apache.geode.internal.protocol.protobuf.ClientProtocol;
-import org.apache.geode.internal.protocol.protobuf.Failure;
-import org.apache.geode.internal.protocol.protobuf.ProtocolErrorCode;
+import org.apache.geode.internal.protocol.Failure;
+import org.apache.geode.internal.protocol.ProtocolErrorCode;
 import org.apache.geode.internal.protocol.protobuf.RegionAPI;
-import org.apache.geode.internal.protocol.protobuf.Result;
+import org.apache.geode.internal.protocol.Result;
 import org.apache.geode.test.junit.categories.UnitTest;
 
 @Category(UnitTest.class)
@@ -69,7 +70,7 @@ public class GetRegionRequestOperationHandlerJUnitTest extends OperationHandlerJ
     when(regionAttributesStub.getScope()).thenReturn(Scope.DISTRIBUTED_ACK);
 
 
-    Result<RegionAPI.GetRegionResponse> result = operationHandler.process(serializationServiceStub,
+    Result<RegionAPI.GetRegionResponse,MessageExecutionContext> result = operationHandler.process(serializationServiceStub,
         MessageUtil.makeGetRegionRequest(TEST_REGION1), getNoAuthExecutionContext(cacheStub));
     RegionAPI.GetRegionResponse response = result.getMessage();
     BasicTypes.Region region = response.getRegion();
@@ -92,7 +93,7 @@ public class GetRegionRequestOperationHandlerJUnitTest extends OperationHandlerJ
     when(emptyCache.rootRegions())
         .thenReturn(Collections.unmodifiableSet(new HashSet<Region<String, String>>()));
     String unknownRegionName = "UNKNOWN_REGION";
-    Result<RegionAPI.GetRegionResponse> result = operationHandler.process(serializationServiceStub,
+    Result<RegionAPI.GetRegionResponse,MessageExecutionContext> result = operationHandler.process(serializationServiceStub,
         MessageUtil.makeGetRegionRequest(unknownRegionName), getNoAuthExecutionContext(emptyCache));
     Assert.assertTrue(result instanceof Failure);
     Assert.assertEquals(ProtocolErrorCode.REGION_NOT_FOUND.codeValue,
diff --git a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/GetRequestOperationHandlerJUnitTest.java b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/GetRequestOperationHandlerJUnitTest.java
index 8064475..f3e80bf 100644
--- a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/GetRequestOperationHandlerJUnitTest.java
+++ b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/GetRequestOperationHandlerJUnitTest.java
@@ -25,13 +25,14 @@ import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import org.apache.geode.cache.Region;
+import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
 import org.apache.geode.internal.protocol.protobuf.BasicTypes;
-import org.apache.geode.internal.protocol.protobuf.Failure;
+import org.apache.geode.internal.protocol.Failure;
 import org.apache.geode.internal.protocol.protobuf.ProtobufTestExecutionContext;
-import org.apache.geode.internal.protocol.protobuf.ProtocolErrorCode;
+import org.apache.geode.internal.protocol.ProtocolErrorCode;
 import org.apache.geode.internal.protocol.protobuf.RegionAPI;
-import org.apache.geode.internal.protocol.protobuf.Result;
-import org.apache.geode.internal.protocol.protobuf.Success;
+import org.apache.geode.internal.protocol.Result;
+import org.apache.geode.internal.protocol.Success;
 import org.apache.geode.internal.protocol.protobuf.utilities.ProtobufRequestUtilities;
 import org.apache.geode.internal.protocol.protobuf.utilities.ProtobufUtilities;
 import org.apache.geode.internal.serialization.exception.UnsupportedEncodingTypeException;
@@ -66,7 +67,7 @@ public class GetRequestOperationHandlerJUnitTest extends OperationHandlerJUnitTe
   @Test
   public void processReturnsTheEncodedValueFromTheRegion() throws Exception {
     RegionAPI.GetRequest getRequest = generateTestRequest(false, false, false);
-    Result<RegionAPI.GetResponse> result = operationHandler.process(serializationServiceStub,
+    Result<RegionAPI.GetResponse,MessageExecutionContext> result = operationHandler.process(serializationServiceStub,
         getRequest, ProtobufTestExecutionContext.getNoAuthExecutionContext(cacheStub));
 
     Assert.assertTrue(result instanceof Success);
@@ -79,7 +80,7 @@ public class GetRequestOperationHandlerJUnitTest extends OperationHandlerJUnitTe
   @Test
   public void processReturnsUnsucessfulResponseForInvalidRegion() throws Exception {
     RegionAPI.GetRequest getRequest = generateTestRequest(true, false, false);
-    Result<RegionAPI.GetResponse> response = operationHandler.process(serializationServiceStub,
+    Result<RegionAPI.GetResponse,MessageExecutionContext> response = operationHandler.process(serializationServiceStub,
         getRequest, ProtobufTestExecutionContext.getNoAuthExecutionContext(cacheStub));
 
     Assert.assertTrue(response instanceof Failure);
@@ -90,7 +91,7 @@ public class GetRequestOperationHandlerJUnitTest extends OperationHandlerJUnitTe
   @Test
   public void processReturnsKeyNotFoundWhenKeyIsNotFound() throws Exception {
     RegionAPI.GetRequest getRequest = generateTestRequest(false, true, false);
-    Result<RegionAPI.GetResponse> response = operationHandler.process(serializationServiceStub,
+    Result<RegionAPI.GetResponse,MessageExecutionContext> response = operationHandler.process(serializationServiceStub,
         getRequest, ProtobufTestExecutionContext.getNoAuthExecutionContext(cacheStub));
 
     Assert.assertTrue(response instanceof Success);
@@ -99,7 +100,7 @@ public class GetRequestOperationHandlerJUnitTest extends OperationHandlerJUnitTe
   @Test
   public void processReturnsLookupFailureWhenKeyFoundWithNoValue() throws Exception {
     RegionAPI.GetRequest getRequest = generateTestRequest(false, false, true);
-    Result<RegionAPI.GetResponse> response = operationHandler.process(serializationServiceStub,
+    Result<RegionAPI.GetResponse,MessageExecutionContext> response = operationHandler.process(serializationServiceStub,
         getRequest, ProtobufTestExecutionContext.getNoAuthExecutionContext(cacheStub));
 
     Assert.assertTrue(response instanceof Success);
@@ -118,7 +119,7 @@ public class GetRequestOperationHandlerJUnitTest extends OperationHandlerJUnitTe
         .setCustomEncodedValue(customEncodedValueBuilder).build();
     RegionAPI.GetRequest getRequest =
         ProtobufRequestUtilities.createGetRequest(TEST_REGION, encodedKey).getGetRequest();
-    Result<RegionAPI.GetResponse> response = operationHandler.process(serializationServiceStub,
+    Result<RegionAPI.GetResponse,MessageExecutionContext> response = operationHandler.process(serializationServiceStub,
         getRequest, ProtobufTestExecutionContext.getNoAuthExecutionContext(cacheStub));
 
     Assert.assertTrue(response instanceof Failure);
diff --git a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/PutAllRequestOperationHandlerJUnitTest.java b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/PutAllRequestOperationHandlerJUnitTest.java
index 9e1d7a5..9e3e406 100644
--- a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/PutAllRequestOperationHandlerJUnitTest.java
+++ b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/PutAllRequestOperationHandlerJUnitTest.java
@@ -31,10 +31,11 @@ import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import org.apache.geode.cache.Region;
+import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
 import org.apache.geode.internal.protocol.protobuf.BasicTypes;
 import org.apache.geode.internal.protocol.protobuf.RegionAPI;
-import org.apache.geode.internal.protocol.protobuf.Result;
-import org.apache.geode.internal.protocol.protobuf.Success;
+import org.apache.geode.internal.protocol.Result;
+import org.apache.geode.internal.protocol.Success;
 import org.apache.geode.internal.protocol.protobuf.utilities.ProtobufRequestUtilities;
 import org.apache.geode.internal.protocol.protobuf.utilities.ProtobufUtilities;
 import org.apache.geode.internal.serialization.exception.UnsupportedEncodingTypeException;
@@ -70,7 +71,7 @@ public class PutAllRequestOperationHandlerJUnitTest extends OperationHandlerJUni
   public void processInsertsMultipleValidEntriesInCache() throws Exception {
     PutAllRequestOperationHandler operationHandler = new PutAllRequestOperationHandler();
 
-    Result<RegionAPI.PutAllResponse> result = operationHandler.process(serializationServiceStub,
+    Result<RegionAPI.PutAllResponse,MessageExecutionContext> result = operationHandler.process(serializationServiceStub,
         generateTestRequest(false, true), getNoAuthExecutionContext(cacheStub));
 
     Assert.assertTrue(result instanceof Success);
@@ -84,7 +85,7 @@ public class PutAllRequestOperationHandlerJUnitTest extends OperationHandlerJUni
   public void processWithInvalidEntrySucceedsAndReturnsFailedKey() throws Exception {
     PutAllRequestOperationHandler operationHandler = new PutAllRequestOperationHandler();
 
-    Result<RegionAPI.PutAllResponse> result = operationHandler.process(serializationServiceStub,
+    Result<RegionAPI.PutAllResponse,MessageExecutionContext> result = operationHandler.process(serializationServiceStub,
         generateTestRequest(true, true), getNoAuthExecutionContext(cacheStub));
 
     assertTrue(result instanceof Success);
@@ -103,7 +104,7 @@ public class PutAllRequestOperationHandlerJUnitTest extends OperationHandlerJUni
   public void processWithNoEntriesPasses() throws Exception {
     PutAllRequestOperationHandler operationHandler = new PutAllRequestOperationHandler();
 
-    Result<RegionAPI.PutAllResponse> result = operationHandler.process(serializationServiceStub,
+    Result<RegionAPI.PutAllResponse,MessageExecutionContext> result = operationHandler.process(serializationServiceStub,
         generateTestRequest(false, false), getNoAuthExecutionContext(cacheStub));
 
     assertTrue(result instanceof Success);
diff --git a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/PutRequestOperationHandlerJUnitTest.java b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/PutRequestOperationHandlerJUnitTest.java
index b90982c..4dec3f0 100644
--- a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/PutRequestOperationHandlerJUnitTest.java
+++ b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/PutRequestOperationHandlerJUnitTest.java
@@ -29,13 +29,14 @@ import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import org.apache.geode.cache.Region;
+import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
 import org.apache.geode.internal.protocol.protobuf.BasicTypes;
-import org.apache.geode.internal.protocol.protobuf.Failure;
+import org.apache.geode.internal.protocol.Failure;
 import org.apache.geode.internal.protocol.protobuf.ProtobufTestExecutionContext;
-import org.apache.geode.internal.protocol.protobuf.ProtocolErrorCode;
+import org.apache.geode.internal.protocol.ProtocolErrorCode;
 import org.apache.geode.internal.protocol.protobuf.RegionAPI;
-import org.apache.geode.internal.protocol.protobuf.Result;
-import org.apache.geode.internal.protocol.protobuf.Success;
+import org.apache.geode.internal.protocol.Result;
+import org.apache.geode.internal.protocol.Success;
 import org.apache.geode.internal.protocol.protobuf.utilities.ProtobufRequestUtilities;
 import org.apache.geode.internal.protocol.protobuf.utilities.ProtobufUtilities;
 import org.apache.geode.internal.serialization.exception.UnsupportedEncodingTypeException;
@@ -62,7 +63,7 @@ public class PutRequestOperationHandlerJUnitTest extends OperationHandlerJUnitTe
   @Test
   public void test_puttingTheEncodedEntryIntoRegion() throws Exception {
     PutRequestOperationHandler operationHandler = new PutRequestOperationHandler();
-    Result<RegionAPI.PutResponse> result = operationHandler.process(serializationServiceStub,
+    Result<RegionAPI.PutResponse,MessageExecutionContext> result = operationHandler.process(serializationServiceStub,
         generateTestRequest(), ProtobufTestExecutionContext.getNoAuthExecutionContext(cacheStub));
 
     assertTrue(result instanceof Success);
@@ -91,7 +92,7 @@ public class PutRequestOperationHandlerJUnitTest extends OperationHandlerJUnitTe
     BasicTypes.Entry testEntry = ProtobufUtilities.createEntry(encodedKey, testValue);
     RegionAPI.PutRequest putRequest =
         ProtobufRequestUtilities.createPutRequest(TEST_REGION, testEntry).getPutRequest();
-    Result<RegionAPI.PutResponse> result = operationHandler.process(serializationServiceStub,
+    Result<RegionAPI.PutResponse,MessageExecutionContext> result = operationHandler.process(serializationServiceStub,
         putRequest, ProtobufTestExecutionContext.getNoAuthExecutionContext(cacheStub));
 
     assertTrue(result instanceof Failure);
@@ -103,7 +104,7 @@ public class PutRequestOperationHandlerJUnitTest extends OperationHandlerJUnitTe
   public void test_RegionNotFound() throws Exception {
     when(cacheStub.getRegion(TEST_REGION)).thenReturn(null);
     PutRequestOperationHandler operationHandler = new PutRequestOperationHandler();
-    Result<RegionAPI.PutResponse> result = operationHandler.process(serializationServiceStub,
+    Result<RegionAPI.PutResponse,MessageExecutionContext> result = operationHandler.process(serializationServiceStub,
         generateTestRequest(), ProtobufTestExecutionContext.getNoAuthExecutionContext(cacheStub));
 
     assertTrue(result instanceof Failure);
@@ -116,7 +117,7 @@ public class PutRequestOperationHandlerJUnitTest extends OperationHandlerJUnitTe
     when(regionMock.put(any(), any())).thenThrow(ClassCastException.class);
 
     PutRequestOperationHandler operationHandler = new PutRequestOperationHandler();
-    Result<RegionAPI.PutResponse> result = operationHandler.process(serializationServiceStub,
+    Result<RegionAPI.PutResponse,MessageExecutionContext> result = operationHandler.process(serializationServiceStub,
         generateTestRequest(), ProtobufTestExecutionContext.getNoAuthExecutionContext(cacheStub));
 
     assertTrue(result instanceof Failure);
diff --git a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/RemoveRequestOperationHandlerJUnitTest.java b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/RemoveRequestOperationHandlerJUnitTest.java
index 5bfad23..e5166d0 100644
--- a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/RemoveRequestOperationHandlerJUnitTest.java
+++ b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/RemoveRequestOperationHandlerJUnitTest.java
@@ -27,14 +27,15 @@ import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import org.apache.geode.cache.Region;
+import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
 import org.apache.geode.internal.protocol.protobuf.BasicTypes;
 import org.apache.geode.internal.protocol.protobuf.ClientProtocol;
-import org.apache.geode.internal.protocol.protobuf.Failure;
+import org.apache.geode.internal.protocol.Failure;
 import org.apache.geode.internal.protocol.protobuf.ProtobufTestExecutionContext;
-import org.apache.geode.internal.protocol.protobuf.ProtocolErrorCode;
+import org.apache.geode.internal.protocol.ProtocolErrorCode;
 import org.apache.geode.internal.protocol.protobuf.RegionAPI;
-import org.apache.geode.internal.protocol.protobuf.Result;
-import org.apache.geode.internal.protocol.protobuf.Success;
+import org.apache.geode.internal.protocol.Result;
+import org.apache.geode.internal.protocol.Success;
 import org.apache.geode.internal.protocol.protobuf.utilities.ProtobufRequestUtilities;
 import org.apache.geode.internal.protocol.protobuf.utilities.ProtobufUtilities;
 import org.apache.geode.internal.serialization.exception.UnsupportedEncodingTypeException;
@@ -67,7 +68,7 @@ public class RemoveRequestOperationHandlerJUnitTest extends OperationHandlerJUni
   @Test
   public void processValidKeyRemovesTheEntryAndReturnSuccess() throws Exception {
     RegionAPI.RemoveRequest removeRequest = generateTestRequest(false, false).getRemoveRequest();
-    Result<RegionAPI.RemoveResponse> result = operationHandler.process(serializationServiceStub,
+    Result<RegionAPI.RemoveResponse,MessageExecutionContext> result = operationHandler.process(serializationServiceStub,
         removeRequest, ProtobufTestExecutionContext.getNoAuthExecutionContext(cacheStub));
 
     assertTrue(result instanceof Success);
@@ -77,7 +78,7 @@ public class RemoveRequestOperationHandlerJUnitTest extends OperationHandlerJUni
   @Test
   public void processReturnsUnsucessfulResponseForInvalidRegion() throws Exception {
     RegionAPI.RemoveRequest removeRequest = generateTestRequest(true, false).getRemoveRequest();
-    Result<RegionAPI.RemoveResponse> result = operationHandler.process(serializationServiceStub,
+    Result<RegionAPI.RemoveResponse,MessageExecutionContext> result = operationHandler.process(serializationServiceStub,
         removeRequest, ProtobufTestExecutionContext.getNoAuthExecutionContext(cacheStub));
 
     assertTrue(result instanceof Failure);
@@ -88,7 +89,7 @@ public class RemoveRequestOperationHandlerJUnitTest extends OperationHandlerJUni
   @Test
   public void processReturnsSuccessWhenKeyIsNotFound() throws Exception {
     RegionAPI.RemoveRequest removeRequest = generateTestRequest(false, true).getRemoveRequest();
-    Result<RegionAPI.RemoveResponse> result = operationHandler.process(serializationServiceStub,
+    Result<RegionAPI.RemoveResponse,MessageExecutionContext> result = operationHandler.process(serializationServiceStub,
         removeRequest, ProtobufTestExecutionContext.getNoAuthExecutionContext(cacheStub));
 
     assertTrue(result instanceof Success);
@@ -108,7 +109,7 @@ public class RemoveRequestOperationHandlerJUnitTest extends OperationHandlerJUni
 
     RegionAPI.RemoveRequest removeRequest =
         ProtobufRequestUtilities.createRemoveRequest(TEST_REGION, encodedKey).getRemoveRequest();;
-    Result<RegionAPI.RemoveResponse> result = operationHandler.process(serializationServiceStub,
+    Result<RegionAPI.RemoveResponse,MessageExecutionContext> result = operationHandler.process(serializationServiceStub,
         removeRequest, ProtobufTestExecutionContext.getNoAuthExecutionContext(cacheStub));
 
     assertTrue(result instanceof Failure);

-- 
To stop receiving notification emails like this one, please contact
"commits@geode.apache.org" <co...@geode.apache.org>.

[geode] 02/04: Initial commit to to clean up Authentication + Authorzation issues

Posted by ud...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

udo pushed a commit to branch feature/GEODE-3705
in repository https://gitbox.apache.org/repos/asf/geode.git

commit 187df09212d8ef00ab13f30eaa1ef69da08d7063
Author: kohlmu-pivotal <uk...@pivotal.io>
AuthorDate: Thu Oct 19 15:46:21 2017 -0700

    Initial commit to to clean up Authentication + Authorzation issues
---
 .../internal/cache/tier/sockets/AcceptorImpl.java  | 119 +++++++++----------
 .../cache/tier/sockets/ClientProtocolService.java  |   2 +
 .../sockets/GenericProtocolServerConnection.java   |   8 +-
 .../tier/sockets/ClientProtocolMessageHandler.java |   4 +-
 .../tier/sockets/MessageExecutionContext.java      |  15 ++-
 .../internal/protocol/ProtobufCachePipeline.java   |  19 ++-
 .../internal/protocol/ProtobufLocatorPipeline.java |   6 +-
 .../internal/protocol/ProtobufProtocolService.java |  61 +++-------
 .../ClientProtocolHandshaker.java}                 |  22 ++--
 .../internal/protocol/protobuf/Handshaker.java     |  60 ++++++++++
 .../protocol/protobuf/ProtobufOpsProcessor.java    |   6 +-
 .../protocol/protobuf/ProtobufStreamProcessor.java |   6 +-
 .../protocol/protobuf/ProtocolErrorCode.java       |   1 +
 .../HandshakerRequestOperationHandler.java         |  59 ++++++++++
 .../security/InvalidConfigAuthenticator.java       |  12 +-
 .../security/ProtobufShiroAuthenticator.java       |  17 ++-
 .../protobuf/security/ProtobufShiroAuthorizer.java |   6 +-
 .../statistics/ProtobufClientStatisticsImpl.java   |  15 ++-
 .../protobuf/utilities/ProtobufUtilities.java      |   6 -
 .../registry/OperationContextRegistry.java         |   2 +-
 .../AuthenticationLookupService.java}              |  31 ++---
 .../{protobuf => }/security/Authenticator.java     |   7 +-
 .../AuthorizationLookupService.java}               |  34 +++---
 .../{protobuf => }/security/Authorizer.java        |   4 +-
 .../{protobuf => }/security/NoOpAuthenticator.java |   6 +-
 .../{protobuf => }/security/NoOpAuthorizer.java    |   4 +-
 .../{protobuf => }/statistics/NoOpStatistics.java  |   4 +-
 .../ProtocolClientStatistics.java}                 |   8 +-
 .../Authorizer.java => proto/handshake_API.proto}  |  23 +++-
 .../protocol/ProtobufProtocolServiceJUnitTest.java |   6 +-
 .../acceptance/CacheConnectionJUnitTest.java       |   6 +-
 .../acceptance/CacheOperationsJUnitTest.java       |   5 +-
 .../acceptance/LocatorConnectionDUnitTest.java     |   5 +-
 .../internal/protocol/protobuf/HandshakerTest.java | 128 +++++++++++++++++++++
 .../ProtobufShiroAuthenticatorJUnitTest.java       |  13 +--
 .../protobuf/ProtobufStreamProcessorTest.java      |   4 +-
 .../protobuf/ProtobufTestExecutionContext.java     |   9 +-
 .../protocol/protobuf/ProtobufTestUtilities.java   |  60 ++++++++++
 ...tAvailableServersOperationHandlerJUnitTest.java |   2 +-
 39 files changed, 548 insertions(+), 257 deletions(-)

diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/AcceptorImpl.java b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/AcceptorImpl.java
index 59ef466..2dea63e 100755
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/AcceptorImpl.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/AcceptorImpl.java
@@ -336,72 +336,24 @@ public class AcceptorImpl implements Acceptor, Runnable, CommBufferPool {
     this.isGatewayReceiver = isGatewayReceiver;
     this.gatewayTransportFilters = transportFilter;
     this.serverConnectionFactory = serverConnectionFactory;
-    {
-      int tmp_maxConnections = maxConnections;
-      if (tmp_maxConnections < MINIMUM_MAX_CONNECTIONS) {
-        tmp_maxConnections = MINIMUM_MAX_CONNECTIONS;
-      }
-      this.maxConnections = tmp_maxConnections;
-    }
-    {
-      int tmp_maxThreads = maxThreads;
-      if (maxThreads == CacheServer.DEFAULT_MAX_THREADS) {
-        // consult system properties for 5.0.2 backwards compatibility
-        if (DEPRECATED_SELECTOR) {
-          tmp_maxThreads = DEPRECATED_SELECTOR_POOL_SIZE;
-        }
-      }
-      if (tmp_maxThreads < 0) {
-        tmp_maxThreads = 0;
-      } else if (tmp_maxThreads > this.maxConnections) {
-        tmp_maxThreads = this.maxConnections;
-      }
-      boolean isWindows = false;
-      String os = System.getProperty("os.name");
-      if (os != null) {
-        if (os.indexOf("Windows") != -1) {
-          isWindows = true;
-        }
-      }
-      if (tmp_maxThreads > 0 && isWindows) {
-        // bug #40472 and JDK bug 6230761 - NIO can't be used with IPv6 on Windows
-        if (getBindAddress() instanceof Inet6Address) {
-          logger.warn(LocalizedMessage
-              .create(LocalizedStrings.AcceptorImpl_IGNORING_MAX_THREADS_DUE_TO_JROCKIT_NIO_BUG));
-          tmp_maxThreads = 0;
-        }
-        // bug #40198 - Selector.wakeup() hangs if VM starts to exit
-        if (isJRockit) {
-          logger.warn(LocalizedMessage
-              .create(LocalizedStrings.AcceptorImpl_IGNORING_MAX_THREADS_DUE_TO_WINDOWS_IPV6_BUG));
-          tmp_maxThreads = 0;
-        }
-      }
-      this.maxThreads = tmp_maxThreads;
-    }
-    {
-      Selector tmp_s = null;
-      // Selector tmp2_s = null;
-      LinkedBlockingQueue tmp_q = null;
-      LinkedBlockingQueue tmp_commQ = null;
-      HashSet tmp_hs = null;
-      SystemTimer tmp_timer = null;
-      if (isSelector()) {
-        tmp_s = Selector.open(); // no longer catch ex to fix bug 36907
-        // tmp2_s = Selector.open(); // workaround for bug 39624
-        tmp_q = new LinkedBlockingQueue();
-        tmp_commQ = new LinkedBlockingQueue();
-        tmp_hs = new HashSet(512);
-        tmp_timer = new SystemTimer(internalCache.getDistributedSystem(), true);
-      }
-      this.selector = tmp_s;
-      // this.tmpSel = tmp2_s;
-      this.selectorQueue = tmp_q;
-      this.commBufferQueue = tmp_commQ;
-      this.selectorRegistrations = tmp_hs;
-      this.hsTimer = tmp_timer;
-      this.tcpNoDelay = tcpNoDelay;
+
+    this.maxConnections = Math.min(maxConnections, MINIMUM_MAX_CONNECTIONS);
+    this.maxThreads = calculateMaxThreads(maxThreads);
+
+    if (isSelector()) {
+      this.selector = Selector.open();
+      this.selectorQueue = new LinkedBlockingQueue();
+      this.commBufferQueue = new LinkedBlockingQueue();
+      this.selectorRegistrations = new HashSet(512);
+      this.hsTimer = new SystemTimer(internalCache.getDistributedSystem(), true);
+    } else {
+      this.selector = null;
+      this.selectorQueue = null;
+      this.commBufferQueue = null;
+      this.selectorRegistrations = null;
+      this.hsTimer = null;
     }
+    this.tcpNoDelay = tcpNoDelay;
 
     {
       if (!isGatewayReceiver) {
@@ -633,6 +585,43 @@ public class AcceptorImpl implements Acceptor, Runnable, CommBufferPool {
         (postAuthzFactoryName != null && postAuthzFactoryName.length() > 0) ? true : false;
   }
 
+  private int calculateMaxThreads(int maxThreads) throws IOException {
+    int tmp_maxThreads = maxThreads;
+    if (maxThreads == CacheServer.DEFAULT_MAX_THREADS) {
+      // consult system properties for 5.0.2 backwards compatibility
+      if (DEPRECATED_SELECTOR) {
+        tmp_maxThreads = DEPRECATED_SELECTOR_POOL_SIZE;
+      }
+    }
+    if (tmp_maxThreads < 0) {
+      tmp_maxThreads = 0;
+    } else if (tmp_maxThreads > this.maxConnections) {
+      tmp_maxThreads = this.maxConnections;
+    }
+    boolean isWindows = false;
+    String os = System.getProperty("os.name");
+    if (os != null) {
+      if (os.indexOf("Windows") != -1) {
+        isWindows = true;
+      }
+    }
+    if (tmp_maxThreads > 0 && isWindows) {
+      // bug #40472 and JDK bug 6230761 - NIO can't be used with IPv6 on Windows
+      if (getBindAddress() instanceof Inet6Address) {
+        logger.warn(LocalizedMessage
+            .create(LocalizedStrings.AcceptorImpl_IGNORING_MAX_THREADS_DUE_TO_JROCKIT_NIO_BUG));
+        tmp_maxThreads = 0;
+      }
+      // bug #40198 - Selector.wakeup() hangs if VM starts to exit
+      if (isJRockit) {
+        logger.warn(LocalizedMessage
+            .create(LocalizedStrings.AcceptorImpl_IGNORING_MAX_THREADS_DUE_TO_WINDOWS_IPV6_BUG));
+        tmp_maxThreads = 0;
+      }
+    }
+    return tmp_maxThreads;
+  }
+
   public long getAcceptorId() {
     return this.acceptorId;
   }
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/ClientProtocolService.java b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/ClientProtocolService.java
index 544f286..79a33a4 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/ClientProtocolService.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/ClientProtocolService.java
@@ -15,6 +15,8 @@
 
 package org.apache.geode.internal.cache.tier.sockets;
 
+import java.util.Map;
+
 import org.apache.geode.StatisticsFactory;
 import org.apache.geode.cache.Cache;
 import org.apache.geode.distributed.internal.InternalLocator;
diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/GenericProtocolServerConnection.java b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/GenericProtocolServerConnection.java
index 5be6cac..2671cbe 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/GenericProtocolServerConnection.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/GenericProtocolServerConnection.java
@@ -38,7 +38,7 @@ import org.apache.geode.internal.security.SecurityService;
  */
 public class GenericProtocolServerConnection extends ServerConnection {
   // The new protocol lives in a separate module and gets loaded when this class is instantiated.
-  private final ClientProtocolProcessor protocolPipeline;
+  private final ClientProtocolProcessor protocolProcessor;
   private boolean cleanedUp;
   private ClientProxyMembershipID clientProxyMembershipID;
 
@@ -52,7 +52,7 @@ public class GenericProtocolServerConnection extends ServerConnection {
       SecurityService securityService) {
     super(socket, c, helper, stats, hsTimeout, socketBufferSize, communicationModeStr,
         communicationMode, acceptor, securityService);
-    this.protocolPipeline = clientProtocolProcessor;
+    this.protocolProcessor = clientProtocolProcessor;
 
     setClientProxyMembershipId();
 
@@ -66,7 +66,7 @@ public class GenericProtocolServerConnection extends ServerConnection {
       InputStream inputStream = socket.getInputStream();
       OutputStream outputStream = socket.getOutputStream();
 
-      protocolPipeline.processMessage(inputStream, outputStream);
+      protocolProcessor.processMessage(inputStream, outputStream);
     } catch (EOFException e) {
       this.setFlagProcessMessagesAsFalse();
       setClientDisconnectedException(e);
@@ -94,7 +94,7 @@ public class GenericProtocolServerConnection extends ServerConnection {
     synchronized (this) {
       if (!cleanedUp) {
         cleanedUp = true;
-        protocolPipeline.close();
+        protocolProcessor.close();
       }
     }
     return super.cleanup();
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/cache/tier/sockets/ClientProtocolMessageHandler.java b/geode-protobuf/src/main/java/org/apache/geode/internal/cache/tier/sockets/ClientProtocolMessageHandler.java
index 1d86d70..4de279b 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/cache/tier/sockets/ClientProtocolMessageHandler.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/cache/tier/sockets/ClientProtocolMessageHandler.java
@@ -19,7 +19,6 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 
-import org.apache.geode.Statistics;
 import org.apache.geode.StatisticsFactory;
 
 
@@ -30,6 +29,9 @@ import org.apache.geode.StatisticsFactory;
  * Currently, only one {@link ClientProtocolMessageHandler} at a time can be used in a Geode
  * instance. It gets wired into {@link ServerConnectionFactory} to create all instances of
  * {@link GenericProtocolServerConnection}.
+ *
+ * Implementors of this interface are expected to be able to be used for any number of connections
+ * at a time (stateless except for the statistics).
  */
 public interface ClientProtocolMessageHandler {
   void receiveMessage(InputStream inputStream, OutputStream outputStream,
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/cache/tier/sockets/MessageExecutionContext.java b/geode-protobuf/src/main/java/org/apache/geode/internal/cache/tier/sockets/MessageExecutionContext.java
index b205b33..0978e41 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/cache/tier/sockets/MessageExecutionContext.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/cache/tier/sockets/MessageExecutionContext.java
@@ -20,10 +20,9 @@ import org.apache.geode.cache.Cache;
 import org.apache.geode.distributed.Locator;
 import org.apache.geode.distributed.internal.InternalLocator;
 import org.apache.geode.internal.exception.InvalidExecutionContextException;
-import org.apache.geode.internal.protocol.protobuf.statistics.ProtobufClientStatistics;
-import org.apache.geode.internal.protocol.protobuf.security.Authorizer;
-import org.apache.geode.internal.protocol.protobuf.security.NoOpAuthorizer;
-import org.apache.geode.security.ResourcePermission;
+import org.apache.geode.internal.protocol.statistics.ProtocolClientStatistics;
+import org.apache.geode.internal.protocol.security.Authorizer;
+import org.apache.geode.internal.protocol.security.NoOpAuthorizer;
 
 @Experimental
 public class MessageExecutionContext {
@@ -31,18 +30,18 @@ public class MessageExecutionContext {
   private Locator locator;
   private final Authorizer authorizer;
   private final Object authenticatedSubject;
-  private final ProtobufClientStatistics statistics;
+  private final ProtocolClientStatistics statistics;
 
 
   public MessageExecutionContext(Cache cache, Authorizer streamAuthorizer,
-      Object authenticatedSubject, ProtobufClientStatistics statistics) {
+      Object authenticatedSubject, ProtocolClientStatistics statistics) {
     this.cache = cache;
     this.authorizer = streamAuthorizer;
     this.authenticatedSubject = authenticatedSubject;
     this.statistics = statistics;
   }
 
-  public MessageExecutionContext(InternalLocator locator, ProtobufClientStatistics statistics) {
+  public MessageExecutionContext(InternalLocator locator, ProtocolClientStatistics statistics) {
     this.locator = locator;
     // set a no-op authorizer until such time as locators implement authentication
     // and authorization checks
@@ -98,7 +97,7 @@ public class MessageExecutionContext {
    * Returns the statistics for recording operation stats. In a unit test environment this may not
    * be a protocol-specific statistics implementation.
    */
-  public ProtobufClientStatistics getStatistics() {
+  public ProtocolClientStatistics getStatistics() {
     return statistics;
   }
 }
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/ProtobufCachePipeline.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/ProtobufCachePipeline.java
index 90c9895..3b6d2e5 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/ProtobufCachePipeline.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/ProtobufCachePipeline.java
@@ -21,46 +21,43 @@ import java.io.OutputStream;
 
 import org.apache.geode.annotations.Experimental;
 import org.apache.geode.cache.Cache;
-import org.apache.geode.cache.IncompatibleVersionException;
 import org.apache.geode.internal.cache.tier.sockets.ClientProtocolProcessor;
 import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
 import org.apache.geode.internal.protocol.protobuf.ProtobufStreamProcessor;
-import org.apache.geode.internal.protocol.protobuf.security.Authenticator;
-import org.apache.geode.internal.protocol.protobuf.security.Authorizer;
-import org.apache.geode.internal.protocol.protobuf.statistics.ProtobufClientStatistics;
+import org.apache.geode.internal.protocol.security.Authenticator;
+import org.apache.geode.internal.protocol.security.Authorizer;
+import org.apache.geode.internal.protocol.statistics.ProtocolClientStatistics;
 import org.apache.geode.internal.security.SecurityService;
 import org.apache.geode.security.AuthenticationFailedException;
 
 
 @Experimental
 public final class ProtobufCachePipeline implements ClientProtocolProcessor {
-  private final ProtobufClientStatistics statistics;
+  private final ProtocolClientStatistics statistics;
   private final Cache cache;
   private final Authorizer authorizer;
-  private final SecurityService securityService;
   private final ProtobufStreamProcessor streamProcessor;
   private final Authenticator authenticator;
 
   private Object authenticatorToken;
 
   ProtobufCachePipeline(ProtobufStreamProcessor protobufStreamProcessor,
-      ProtobufClientStatistics statistics, Cache cache, Authenticator authenticator,
-      Authorizer authorizer, SecurityService securityService) {
+      ProtocolClientStatistics statistics, Cache cache, Authenticator authenticator,
+      Authorizer authorizer) {
     this.streamProcessor = protobufStreamProcessor;
     this.statistics = statistics;
     this.cache = cache;
     this.authenticator = authenticator;
     this.authorizer = authorizer;
-    this.securityService = securityService;
     this.statistics.clientConnected();
   }
 
   @Override
   public void processMessage(InputStream inputStream, OutputStream outputStream)
-      throws IOException, IncompatibleVersionException {
+      throws IOException {
     if (authenticatorToken == null) {
       try {
-        authenticatorToken = authenticator.authenticate(inputStream, outputStream, securityService);
+        authenticatorToken = authenticator.authenticate(inputStream, outputStream);
       } catch (AuthenticationFailedException ex) {
         statistics.incAuthenticationFailures();
         throw new IOException(ex);
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/ProtobufLocatorPipeline.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/ProtobufLocatorPipeline.java
index f4ed9e2..bc0bf6a 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/ProtobufLocatorPipeline.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/ProtobufLocatorPipeline.java
@@ -25,16 +25,16 @@ import org.apache.geode.distributed.internal.InternalLocator;
 import org.apache.geode.internal.cache.tier.sockets.ClientProtocolProcessor;
 import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
 import org.apache.geode.internal.protocol.protobuf.ProtobufStreamProcessor;
-import org.apache.geode.internal.protocol.protobuf.statistics.ProtobufClientStatistics;
+import org.apache.geode.internal.protocol.statistics.ProtocolClientStatistics;
 
 @Experimental
 public final class ProtobufLocatorPipeline implements ClientProtocolProcessor {
-  private final ProtobufClientStatistics statistics;
+  private final ProtocolClientStatistics statistics;
   private final InternalLocator locator;
   private final ProtobufStreamProcessor streamProcessor;
 
   ProtobufLocatorPipeline(ProtobufStreamProcessor protobufStreamProcessor,
-      ProtobufClientStatistics statistics, InternalLocator locator) {
+      ProtocolClientStatistics statistics, InternalLocator locator) {
     this.streamProcessor = protobufStreamProcessor;
     this.statistics = statistics;
     this.locator = locator;
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/ProtobufProtocolService.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/ProtobufProtocolService.java
index 7c14852..97570db 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/ProtobufProtocolService.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/ProtobufProtocolService.java
@@ -19,28 +19,28 @@ import org.apache.geode.cache.Cache;
 import org.apache.geode.distributed.internal.InternalLocator;
 import org.apache.geode.internal.cache.tier.sockets.ClientProtocolProcessor;
 import org.apache.geode.internal.cache.tier.sockets.ClientProtocolService;
-import org.apache.geode.internal.protocol.protobuf.security.Authorizer;
-import org.apache.geode.internal.protocol.protobuf.security.InvalidConfigAuthenticator;
-import org.apache.geode.internal.protocol.protobuf.security.NoOpAuthorizer;
-import org.apache.geode.internal.protocol.protobuf.security.ProtobufShiroAuthenticator;
 import org.apache.geode.internal.protocol.protobuf.ProtobufStreamProcessor;
-import org.apache.geode.internal.protocol.protobuf.security.ProtobufShiroAuthorizer;
-import org.apache.geode.internal.protocol.protobuf.statistics.NoOpStatistics;
-import org.apache.geode.internal.protocol.protobuf.statistics.ProtobufClientStatistics;
+import org.apache.geode.internal.protocol.statistics.NoOpStatistics;
+import org.apache.geode.internal.protocol.statistics.ProtocolClientStatistics;
 import org.apache.geode.internal.protocol.protobuf.statistics.ProtobufClientStatisticsImpl;
+import org.apache.geode.internal.protocol.security.AuthenticationLookupService;
+import org.apache.geode.internal.protocol.security.Authenticator;
+import org.apache.geode.internal.protocol.security.AuthorizationLookupService;
+import org.apache.geode.internal.protocol.security.Authorizer;
 import org.apache.geode.internal.security.SecurityService;
-import org.apache.geode.internal.protocol.protobuf.security.Authenticator;
-import org.apache.geode.internal.protocol.protobuf.security.NoOpAuthenticator;
 
 public class ProtobufProtocolService implements ClientProtocolService {
-  private volatile ProtobufClientStatistics statistics;
+  private volatile ProtocolClientStatistics statistics;
   private final ProtobufStreamProcessor protobufStreamProcessor = new ProtobufStreamProcessor();
+  private final AuthenticationLookupService authenticationLookupService =
+      new AuthenticationLookupService();
+  private final AuthorizationLookupService authorizationLookupService =
+      new AuthorizationLookupService();
 
   @Override
   public synchronized void initializeStatistics(String statisticsName, StatisticsFactory factory) {
     if (statistics == null) {
-      statistics = new ProtobufClientStatisticsImpl(factory, statisticsName,
-          ProtobufClientStatistics.PROTOBUF_STATS_NAME);
+      statistics = new ProtobufClientStatisticsImpl(factory, statisticsName);
     }
   }
 
@@ -49,18 +49,18 @@ public class ProtobufProtocolService implements ClientProtocolService {
       SecurityService securityService) {
     assert (statistics != null);
 
-    Authenticator authenticator = getAuthenticator(securityService);
-    Authorizer authorizer = getAuthorizer(securityService);
+    Authenticator authenticator = authenticationLookupService.getAuthenticator(securityService);
+    Authorizer authorizer = authorizationLookupService.getAuthorizer(securityService);
 
     return new ProtobufCachePipeline(protobufStreamProcessor, getStatistics(), cache, authenticator,
-        authorizer, securityService);
+        authorizer);
   }
 
   /**
    * For internal use. This is necessary because the statistics may get initialized in another
    * thread.
    */
-  ProtobufClientStatistics getStatistics() {
+  ProtocolClientStatistics getStatistics() {
     if (statistics == null) {
       return new NoOpStatistics();
     }
@@ -71,33 +71,4 @@ public class ProtobufProtocolService implements ClientProtocolService {
   public ClientProtocolProcessor createProcessorForLocator(InternalLocator locator) {
     return new ProtobufLocatorPipeline(protobufStreamProcessor, getStatistics(), locator);
   }
-
-  private Authenticator getAuthenticator(SecurityService securityService) {
-    if (securityService.isIntegratedSecurity()) {
-      // Simple authenticator...normal shiro
-      return new ProtobufShiroAuthenticator();
-    }
-    if (securityService.isPeerSecurityRequired() || securityService.isClientSecurityRequired()) {
-      // Failing authentication...legacy security
-      return new InvalidConfigAuthenticator();
-    } else {
-      // Noop authenticator...no security
-      return new NoOpAuthenticator();
-    }
-  }
-
-  private Authorizer getAuthorizer(SecurityService securityService) {
-    if (securityService.isIntegratedSecurity()) {
-      // Simple authenticator...normal shiro
-      return new ProtobufShiroAuthorizer(securityService);
-    }
-    if (securityService.isPeerSecurityRequired() || securityService.isClientSecurityRequired()) {
-      // Failing authentication...legacy security
-      // This should never be called.
-      return null;
-    } else {
-      // Noop authenticator...no security
-      return new NoOpAuthorizer();
-    }
-  }
 }
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/statistics/ProtobufClientStatistics.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/handshaker/ClientProtocolHandshaker.java
similarity index 63%
copy from geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/statistics/ProtobufClientStatistics.java
copy to geode-protobuf/src/main/java/org/apache/geode/internal/protocol/handshaker/ClientProtocolHandshaker.java
index a8070c7..da81325 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/statistics/ProtobufClientStatistics.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/handshaker/ClientProtocolHandshaker.java
@@ -12,20 +12,18 @@
  * or implied. See the License for the specific language governing permissions and limitations under
  * the License.
  */
-package org.apache.geode.internal.protocol.protobuf.statistics;
+package org.apache.geode.internal.protocol.handshaker;
 
-public interface ProtobufClientStatistics {
-  String PROTOBUF_STATS_NAME = "ProtobufStats";
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
 
-  void clientConnected();
+import org.apache.geode.cache.IncompatibleVersionException;
+import org.apache.geode.internal.protocol.security.Authenticator;
 
-  void clientDisconnected();
+public interface ClientProtocolHandshaker {
+  void processHandshake(InputStream inputStream, OutputStream outputStream)
+      throws IOException, IncompatibleVersionException;
 
-  void messageReceived(int bytes);
-
-  void messageSent(int bytes);
-
-  void incAuthorizationViolations();
-
-  void incAuthenticationFailures();
+  boolean completed();
 }
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/Handshaker.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/Handshaker.java
new file mode 100644
index 0000000..1812f92
--- /dev/null
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/Handshaker.java
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package org.apache.geode.internal.protocol.protobuf;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+import org.apache.logging.log4j.Logger;
+
+import org.apache.geode.cache.IncompatibleVersionException;
+import org.apache.geode.internal.logging.LogService;
+import org.apache.geode.internal.protocol.handshaker.ClientProtocolHandshaker;
+import org.apache.geode.internal.protocol.protobuf.operations.handshaker.HandshakerRequestOperationHandler;
+
+public class Handshaker implements ClientProtocolHandshaker {
+  private static final Logger logger = LogService.getLogger();
+
+  private boolean succesfulHandshake = false;
+  private final HandshakerRequestOperationHandler handshakerRequestOperationHandler;
+
+  public Handshaker() {
+    handshakerRequestOperationHandler = new HandshakerRequestOperationHandler();
+  }
+
+  @Override
+  public void processHandshake(InputStream inputStream, OutputStream outputStream)
+      throws IOException, IncompatibleVersionException {
+    HandshakeAPI.HandshakeRequest handshakeRequest =
+        HandshakeAPI.HandshakeRequest.parseDelimitedFrom(inputStream);
+
+    // At this stage HandshakerRequestOperationHandler is not wired into the
+    // ProtobufOpsStreamProcesser.
+    // Thus passing in null serializationService and executionContext.
+    Result<HandshakeAPI.HandshakeResponse> result =
+        handshakerRequestOperationHandler.process(null, handshakeRequest, null);
+
+    HandshakeAPI.HandshakeResponse handshakeResponse = result.getMessage();
+    handshakeResponse.writeDelimitedTo(outputStream);
+    succesfulHandshake = handshakeResponse.getOk();
+  }
+
+  @Override
+  public boolean completed() {
+    return succesfulHandshake;
+  }
+}
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/ProtobufOpsProcessor.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/ProtobufOpsProcessor.java
index a8cde46..4fd1764 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/ProtobufOpsProcessor.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/ProtobufOpsProcessor.java
@@ -20,8 +20,8 @@ import org.apache.geode.annotations.Experimental;
 import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
 import org.apache.geode.internal.exception.InvalidExecutionContextException;
 import org.apache.geode.internal.logging.LogService;
-import org.apache.geode.internal.protocol.protobuf.registry.OperationContextRegistry;
-import org.apache.geode.internal.protocol.protobuf.statistics.ProtobufClientStatistics;
+import org.apache.geode.internal.protocol.registry.OperationContextRegistry;
+import org.apache.geode.internal.protocol.statistics.ProtocolClientStatistics;
 import org.apache.geode.internal.protocol.protobuf.utilities.ProtobufResponseUtilities;
 import org.apache.geode.internal.serialization.SerializationService;
 
@@ -74,7 +74,7 @@ public class ProtobufOpsProcessor {
   }
 
   private void recordAuthorizationViolation(MessageExecutionContext context) {
-    ProtobufClientStatistics statistics = context.getStatistics();
+    ProtocolClientStatistics statistics = context.getStatistics();
     statistics.incAuthorizationViolations();
   }
 }
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/ProtobufStreamProcessor.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/ProtobufStreamProcessor.java
index 89f02e3..9386ee7 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/ProtobufStreamProcessor.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/ProtobufStreamProcessor.java
@@ -26,9 +26,9 @@ import org.apache.geode.internal.cache.tier.sockets.ClientProtocolMessageHandler
 import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
 import org.apache.geode.internal.logging.LogService;
 import org.apache.geode.internal.protocol.exception.InvalidProtocolMessageException;
-import org.apache.geode.internal.protocol.protobuf.registry.OperationContextRegistry;
+import org.apache.geode.internal.protocol.registry.OperationContextRegistry;
 import org.apache.geode.internal.protocol.protobuf.serializer.ProtobufProtocolSerializer;
-import org.apache.geode.internal.protocol.protobuf.statistics.ProtobufClientStatistics;
+import org.apache.geode.internal.protocol.statistics.ProtocolClientStatistics;
 import org.apache.geode.internal.protocol.protobuf.utilities.ProtobufUtilities;
 
 /**
@@ -67,7 +67,7 @@ public class ProtobufStreamProcessor implements ClientProtocolMessageHandler {
       logger.debug(errorMessage);
       throw new EOFException(errorMessage);
     }
-    ProtobufClientStatistics statistics = executionContext.getStatistics();
+    ProtocolClientStatistics statistics = executionContext.getStatistics();
     statistics.messageReceived(message.getSerializedSize());
 
     ClientProtocol.Request request = message.getRequest();
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/ProtocolErrorCode.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/ProtocolErrorCode.java
index 0e41d7a..2c895d3 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/ProtocolErrorCode.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/ProtocolErrorCode.java
@@ -19,6 +19,7 @@ public enum ProtocolErrorCode {
   VALUE_ENCODING_ERROR(1100),
   UNSUPPORTED_VERSION(1101),
   UNSUPPORTED_OPERATION(1102),
+  UNSUPPORTED_AUTHENTICATION_MODE(1103),
   AUTHENTICATION_FAILED(1200),
   AUTHORIZATION_FAILED(1201),
   UNAUTHORIZED_REQUEST(1202),
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/handshaker/HandshakerRequestOperationHandler.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/handshaker/HandshakerRequestOperationHandler.java
new file mode 100644
index 0000000..b31247b
--- /dev/null
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/operations/handshaker/HandshakerRequestOperationHandler.java
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package org.apache.geode.internal.protocol.protobuf.operations.handshaker;
+
+import static org.apache.geode.internal.protocol.protobuf.ProtocolErrorCode.CONSTRAINT_VIOLATION;
+import static org.apache.geode.internal.protocol.protobuf.ProtocolErrorCode.UNSUPPORTED_VERSION;
+
+import org.apache.logging.log4j.Logger;
+
+import org.apache.geode.cache.IncompatibleVersionException;
+import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
+import org.apache.geode.internal.exception.InvalidExecutionContextException;
+import org.apache.geode.internal.logging.LogService;
+import org.apache.geode.internal.protocol.operations.OperationHandler;
+import org.apache.geode.internal.protocol.protobuf.BasicTypes;
+import org.apache.geode.internal.protocol.protobuf.ClientProtocol;
+import org.apache.geode.internal.protocol.protobuf.Failure;
+import org.apache.geode.internal.protocol.protobuf.HandshakeAPI;
+import org.apache.geode.internal.protocol.protobuf.ProtocolErrorCode;
+import org.apache.geode.internal.protocol.protobuf.Result;
+import org.apache.geode.internal.protocol.protobuf.Success;
+import org.apache.geode.internal.protocol.protobuf.utilities.ProtobufResponseUtilities;
+import org.apache.geode.internal.serialization.SerializationService;
+
+public class HandshakerRequestOperationHandler
+    implements OperationHandler<HandshakeAPI.HandshakeRequest, HandshakeAPI.HandshakeResponse> {
+  private static final int MAJOR_VERSION = 1;
+  private static final int MINOR_VERSION = 0;
+  private static final Logger logger =
+      LogService.getLogger(HandshakerRequestOperationHandler.class);
+
+  @Override
+  public Result<HandshakeAPI.HandshakeResponse> process(SerializationService serializationService,
+      HandshakeAPI.HandshakeRequest request, MessageExecutionContext executionContext) {
+    HandshakeAPI.Semver version = request.getVersion();
+    if (version.getMajor() != MAJOR_VERSION || version.getMinor() < MINOR_VERSION) {
+      logger.warn("Version mismatch: incompatible version. Supported version is: " + MAJOR_VERSION
+          + "." + MINOR_VERSION);
+      return Success.of(HandshakeAPI.HandshakeResponse.newBuilder().setOk(false)
+          .setError(BasicTypes.Error.newBuilder().setErrorCode(UNSUPPORTED_VERSION.codeValue)
+              .setMessage("Version mismatch: incompatible version. Supported version is: "
+                  + MAJOR_VERSION + "." + MINOR_VERSION))
+          .build());
+    }
+    return Success.of(HandshakeAPI.HandshakeResponse.newBuilder().setOk(true).build());
+  }
+}
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/InvalidConfigAuthenticator.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/InvalidConfigAuthenticator.java
index bf3d669..e924bc6 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/InvalidConfigAuthenticator.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/InvalidConfigAuthenticator.java
@@ -25,16 +25,20 @@ import org.apache.geode.internal.protocol.protobuf.ProtocolErrorCode;
 import org.apache.logging.log4j.Logger;
 
 import org.apache.geode.internal.logging.LogService;
-import org.apache.geode.internal.protocol.protobuf.AuthenticationAPI;
+import org.apache.geode.internal.protocol.security.Authenticator;
 import org.apache.geode.internal.security.SecurityService;
-import org.apache.geode.security.AuthenticationRequiredException;
 
 public class InvalidConfigAuthenticator implements Authenticator {
   private static final Logger logger = LogService.getLogger(InvalidConfigAuthenticator.class);
+  private final SecurityService securityService;
+
+  public InvalidConfigAuthenticator(SecurityService securityService) {
+    this.securityService = securityService;
+  }
 
   @Override
-  public Object authenticate(InputStream inputStream, OutputStream outputStream,
-      SecurityService securityService) throws IOException {
+  public Object authenticate(InputStream inputStream, OutputStream outputStream)
+      throws IOException {
     logger.warn(
         "Attempting to authenticate incoming protobuf message using legacy security implementation. This is not supported. Failing authentication.");
 
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/ProtobufShiroAuthenticator.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/ProtobufShiroAuthenticator.java
index ca47b94..6d6a497 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/ProtobufShiroAuthenticator.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/ProtobufShiroAuthenticator.java
@@ -20,6 +20,7 @@ import org.apache.geode.internal.protocol.protobuf.AuthenticationAPI;
 
 import org.apache.geode.internal.protocol.protobuf.BasicTypes;
 import org.apache.geode.internal.protocol.protobuf.ClientProtocol;
+import org.apache.geode.internal.protocol.security.Authenticator;
 import org.apache.geode.internal.security.SecurityService;
 import org.apache.geode.security.AuthenticationFailedException;
 
@@ -31,13 +32,17 @@ import java.util.Properties;
 import org.apache.shiro.subject.Subject;
 
 public class ProtobufShiroAuthenticator implements Authenticator {
+  private static final String UNEXECPTED_REQUEST = "Expected to receive an authentication request";
 
-  private static final String SHOULD_HAVE_AUTHED =
-      "Got non-auth request while expecting authentication request";
+  private final SecurityService securityService;
+
+  public ProtobufShiroAuthenticator(SecurityService securityService) {
+    this.securityService = securityService;
+  }
 
   @Override
-  public Subject authenticate(InputStream inputStream, OutputStream outputStream,
-      SecurityService securityService) throws IOException, AuthenticationFailedException {
+  public Subject authenticate(InputStream inputStream, OutputStream outputStream)
+      throws IOException, AuthenticationFailedException {
     ClientProtocol.Message message = ClientProtocol.Message.parseDelimitedFrom(inputStream);
 
     if (message.getRequest().getRequestAPICase()
@@ -79,9 +84,9 @@ public class ProtobufShiroAuthenticator implements Authenticator {
         .setResponse(ClientProtocol.Response.newBuilder()
             .setErrorResponse(ClientProtocol.ErrorResponse.newBuilder()
                 .setError(BasicTypes.Error.newBuilder()
-                    .setErrorCode(AUTHENTICATION_FAILED.codeValue).setMessage(SHOULD_HAVE_AUTHED))))
+                    .setErrorCode(AUTHENTICATION_FAILED.codeValue).setMessage(UNEXECPTED_REQUEST))))
         .build().writeDelimitedTo(outputStream);
 
-    throw new IOException(SHOULD_HAVE_AUTHED);
+    throw new IOException(UNEXECPTED_REQUEST);
   }
 }
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/ProtobufShiroAuthorizer.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/ProtobufShiroAuthorizer.java
index 78d51c0..b078e4b 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/ProtobufShiroAuthorizer.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/ProtobufShiroAuthorizer.java
@@ -20,7 +20,7 @@ import org.apache.shiro.util.ThreadState;
 import org.apache.geode.internal.security.SecurityService;
 import org.apache.geode.security.NotAuthorizedException;
 import org.apache.geode.security.ResourcePermission;
-import org.apache.geode.internal.protocol.protobuf.security.Authorizer;
+import org.apache.geode.internal.protocol.security.Authorizer;
 
 public class ProtobufShiroAuthorizer implements Authorizer {
   private final SecurityService securityService;
@@ -30,8 +30,8 @@ public class ProtobufShiroAuthorizer implements Authorizer {
   }
 
   @Override
-  public boolean authorize(Object authenticatedSubject, ResourcePermission permissionRequested) {
-    ThreadState threadState = securityService.bindSubject((Subject) authenticatedSubject);
+  public boolean authorize(Object authenticatedToken, ResourcePermission permissionRequested) {
+    ThreadState threadState = securityService.bindSubject((Subject) authenticatedToken);
 
     try {
       securityService.authorize(permissionRequested);
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/statistics/ProtobufClientStatisticsImpl.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/statistics/ProtobufClientStatisticsImpl.java
index 24a3dbb..4868966 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/statistics/ProtobufClientStatisticsImpl.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/statistics/ProtobufClientStatisticsImpl.java
@@ -18,8 +18,10 @@ import org.apache.geode.StatisticDescriptor;
 import org.apache.geode.Statistics;
 import org.apache.geode.StatisticsFactory;
 import org.apache.geode.StatisticsType;
+import org.apache.geode.internal.protocol.statistics.ProtocolClientStatistics;
 
-public class ProtobufClientStatisticsImpl implements ProtobufClientStatistics {
+public class ProtobufClientStatisticsImpl implements ProtocolClientStatistics {
+  public static final String PROTOBUF_CLIENT_STATISTICS = "ProtobufProtocolStats";
   private final StatisticsType statType;
   private final Statistics stats;
   private final int currentClientConnectionsId;
@@ -32,8 +34,7 @@ public class ProtobufClientStatisticsImpl implements ProtobufClientStatistics {
   private final int authorizationViolationsId;
   private final int authenticationFailuresId;
 
-  public ProtobufClientStatisticsImpl(StatisticsFactory statisticsFactory, String statisticsName,
-      String typeName) {
+  public ProtobufClientStatisticsImpl(StatisticsFactory statisticsFactory, String statisticsName) {
     StatisticDescriptor[] serverStatDescriptors = new StatisticDescriptor[] {
         statisticsFactory.createIntGauge("currentClientConnections",
             "Number of sockets accepted and used for client to server messaging.", "sockets"),
@@ -53,7 +54,7 @@ public class ProtobufClientStatisticsImpl implements ProtobufClientStatistics {
             "messages"),
         statisticsFactory.createLongCounter("messagesSent", "Messages sent to clients.",
             "messages")};
-    statType = statisticsFactory.createType(typeName, "Protobuf client/server statistics",
+    statType = statisticsFactory.createType(getStatsName(), "Protobuf client/server statistics",
         serverStatDescriptors);
     this.stats = statisticsFactory.createAtomicStatistics(statType, statisticsName);
     currentClientConnectionsId = this.stats.nameToId("currentClientConnections");
@@ -67,6 +68,12 @@ public class ProtobufClientStatisticsImpl implements ProtobufClientStatistics {
     messagesSentId = this.stats.nameToId("messagesSent");
   }
 
+
+  @Override
+  public String getStatsName() {
+    return PROTOBUF_CLIENT_STATISTICS;
+  }
+
   @Override
   public void clientConnected() {
     stats.incInt(currentClientConnectionsId, 1);
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/utilities/ProtobufUtilities.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/utilities/ProtobufUtilities.java
index a44bf74..320a10c 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/utilities/ProtobufUtilities.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/utilities/ProtobufUtilities.java
@@ -194,12 +194,6 @@ public abstract class ProtobufUtilities {
     return protoRegionBuilder.build();
   }
 
-  public static ClientProtocol.Request createProtobufRequestWithGetRegionNamesRequest(
-      RegionAPI.GetRegionNamesRequest getRegionNamesRequest) {
-    return ClientProtocol.Request.newBuilder().setGetRegionNamesRequest(getRegionNamesRequest)
-        .build();
-  }
-
   public static ClientProtocol.Request.Builder createProtobufRequestBuilder() {
     return ClientProtocol.Request.newBuilder();
   }
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/registry/OperationContextRegistry.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/registry/OperationContextRegistry.java
similarity index 98%
rename from geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/registry/OperationContextRegistry.java
rename to geode-protobuf/src/main/java/org/apache/geode/internal/protocol/registry/OperationContextRegistry.java
index 736fba5..dbf6259 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/registry/OperationContextRegistry.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/registry/OperationContextRegistry.java
@@ -13,7 +13,7 @@
  * the License.
  */
 
-package org.apache.geode.internal.protocol.protobuf.registry;
+package org.apache.geode.internal.protocol.registry;
 
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/NoOpAuthenticator.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/security/AuthenticationLookupService.java
similarity index 51%
copy from geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/NoOpAuthenticator.java
copy to geode-protobuf/src/main/java/org/apache/geode/internal/protocol/security/AuthenticationLookupService.java
index 116d92c..f61a300 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/NoOpAuthenticator.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/security/AuthenticationLookupService.java
@@ -12,23 +12,24 @@
  * or implied. See the License for the specific language governing permissions and limitations under
  * the License.
  */
-package org.apache.geode.internal.protocol.protobuf.security;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
+package org.apache.geode.internal.protocol.security;
 
+import org.apache.geode.internal.protocol.protobuf.security.InvalidConfigAuthenticator;
+import org.apache.geode.internal.protocol.protobuf.security.ProtobufShiroAuthenticator;
 import org.apache.geode.internal.security.SecurityService;
 
-/**
- * An implementation of {@link Authenticator} that doesn't use its parameters and always returns
- * true.
- */
-public class NoOpAuthenticator implements Authenticator {
-  @Override
-  public Object authenticate(InputStream inputStream, OutputStream outputStream,
-      SecurityService securityService) throws IOException {
-    // this method needs to do nothing as it is a pass-through implementation
-    return new Object();
+public class AuthenticationLookupService {
+  public Authenticator getAuthenticator(SecurityService securityService) {
+    if (securityService.isIntegratedSecurity()) {
+      // Simple authenticator...normal shiro
+      return new ProtobufShiroAuthenticator(securityService);
+    }
+    if (securityService.isPeerSecurityRequired() || securityService.isClientSecurityRequired()) {
+      // Failing authentication...legacy security
+      return new InvalidConfigAuthenticator(securityService);
+    } else {
+      // Noop authenticator...no security
+      return new NoOpAuthenticator();
+    }
   }
 }
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/Authenticator.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/security/Authenticator.java
similarity index 88%
rename from geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/Authenticator.java
rename to geode-protobuf/src/main/java/org/apache/geode/internal/protocol/security/Authenticator.java
index 2873933..f4234cd 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/Authenticator.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/security/Authenticator.java
@@ -12,7 +12,7 @@
  * or implied. See the License for the specific language governing permissions and limitations under
  * the License.
  */
-package org.apache.geode.internal.protocol.protobuf.security;
+package org.apache.geode.internal.protocol.security;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -34,10 +34,9 @@ public interface Authenticator {
    *
    * @param inputStream to read auth messages from.
    * @param outputStream to send messages to.
-   * @param securityService used for validating credentials.
    * @return authenticated principal
    * @throws IOException if EOF or if invalid input is received.
    */
-  Object authenticate(InputStream inputStream, OutputStream outputStream,
-      SecurityService securityService) throws IOException, AuthenticationFailedException;
+  Object authenticate(InputStream inputStream, OutputStream outputStream)
+      throws IOException, AuthenticationFailedException;
 }
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/NoOpAuthenticator.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/security/AuthorizationLookupService.java
similarity index 50%
copy from geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/NoOpAuthenticator.java
copy to geode-protobuf/src/main/java/org/apache/geode/internal/protocol/security/AuthorizationLookupService.java
index 116d92c..ed81ea6 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/NoOpAuthenticator.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/security/AuthorizationLookupService.java
@@ -12,23 +12,29 @@
  * or implied. See the License for the specific language governing permissions and limitations under
  * the License.
  */
-package org.apache.geode.internal.protocol.protobuf.security;
+package org.apache.geode.internal.protocol.security;
 
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.ServiceLoader;
 
+import org.apache.geode.GemFireConfigException;
+import org.apache.geode.internal.protocol.protobuf.security.ProtobufShiroAuthorizer;
 import org.apache.geode.internal.security.SecurityService;
 
-/**
- * An implementation of {@link Authenticator} that doesn't use its parameters and always returns
- * true.
- */
-public class NoOpAuthenticator implements Authenticator {
-  @Override
-  public Object authenticate(InputStream inputStream, OutputStream outputStream,
-      SecurityService securityService) throws IOException {
-    // this method needs to do nothing as it is a pass-through implementation
-    return new Object();
+public class AuthorizationLookupService {
+  public Authorizer getAuthorizer(SecurityService securityService) {
+    if (securityService.isIntegratedSecurity()) {
+      // Simple authenticator...normal shiro
+      return new ProtobufShiroAuthorizer(securityService);
+    }
+    if (securityService.isPeerSecurityRequired() || securityService.isClientSecurityRequired()) {
+      // Failing authentication...legacy security
+      // This should never be called.
+      return null;
+    } else {
+      // Noop authenticator...no security
+      return new NoOpAuthorizer();
+    }
   }
 }
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/Authorizer.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/security/Authorizer.java
similarity index 85%
copy from geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/Authorizer.java
copy to geode-protobuf/src/main/java/org/apache/geode/internal/protocol/security/Authorizer.java
index 3cfb2db..525e42d 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/Authorizer.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/security/Authorizer.java
@@ -12,10 +12,10 @@
  * or implied. See the License for the specific language governing permissions and limitations under
  * the License.
  */
-package org.apache.geode.internal.protocol.protobuf.security;
+package org.apache.geode.internal.protocol.security;
 
 import org.apache.geode.security.ResourcePermission;
 
 public interface Authorizer {
-  boolean authorize(Object authenticatedSubject, ResourcePermission permissionRequested);
+  boolean authorize(Object authenticatedToken, ResourcePermission permissionRequested);
 }
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/NoOpAuthenticator.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/security/NoOpAuthenticator.java
similarity index 90%
rename from geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/NoOpAuthenticator.java
rename to geode-protobuf/src/main/java/org/apache/geode/internal/protocol/security/NoOpAuthenticator.java
index 116d92c..d4f96e4 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/NoOpAuthenticator.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/security/NoOpAuthenticator.java
@@ -12,7 +12,7 @@
  * or implied. See the License for the specific language governing permissions and limitations under
  * the License.
  */
-package org.apache.geode.internal.protocol.protobuf.security;
+package org.apache.geode.internal.protocol.security;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -26,8 +26,8 @@ import org.apache.geode.internal.security.SecurityService;
  */
 public class NoOpAuthenticator implements Authenticator {
   @Override
-  public Object authenticate(InputStream inputStream, OutputStream outputStream,
-      SecurityService securityService) throws IOException {
+  public Object authenticate(InputStream inputStream, OutputStream outputStream)
+      throws IOException {
     // this method needs to do nothing as it is a pass-through implementation
     return new Object();
   }
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/NoOpAuthorizer.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/security/NoOpAuthorizer.java
similarity index 86%
rename from geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/NoOpAuthorizer.java
rename to geode-protobuf/src/main/java/org/apache/geode/internal/protocol/security/NoOpAuthorizer.java
index 3add18c..61d0383 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/NoOpAuthorizer.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/security/NoOpAuthorizer.java
@@ -12,7 +12,7 @@
  * or implied. See the License for the specific language governing permissions and limitations under
  * the License.
  */
-package org.apache.geode.internal.protocol.protobuf.security;
+package org.apache.geode.internal.protocol.security;
 
 import org.apache.geode.security.ResourcePermission;
 
@@ -21,7 +21,7 @@ import org.apache.geode.security.ResourcePermission;
  */
 public class NoOpAuthorizer implements Authorizer {
   @Override
-  public boolean authorize(Object authenticatedSubject, ResourcePermission permissionRequested) {
+  public boolean authorize(Object authenticatedToken, ResourcePermission permissionRequested) {
     return true;
   }
 }
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/statistics/NoOpStatistics.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/statistics/NoOpStatistics.java
similarity index 89%
rename from geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/statistics/NoOpStatistics.java
rename to geode-protobuf/src/main/java/org/apache/geode/internal/protocol/statistics/NoOpStatistics.java
index e06ea8d..8bacd32 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/statistics/NoOpStatistics.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/statistics/NoOpStatistics.java
@@ -12,9 +12,9 @@
  * or implied. See the License for the specific language governing permissions and limitations under
  * the License.
  */
-package org.apache.geode.internal.protocol.protobuf.statistics;
+package org.apache.geode.internal.protocol.statistics;
 
-public class NoOpStatistics implements ProtobufClientStatistics {
+public class NoOpStatistics implements ProtocolClientStatistics {
   @Override
   public void clientConnected() {
 
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/statistics/ProtobufClientStatistics.java b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/statistics/ProtocolClientStatistics.java
similarity index 85%
rename from geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/statistics/ProtobufClientStatistics.java
rename to geode-protobuf/src/main/java/org/apache/geode/internal/protocol/statistics/ProtocolClientStatistics.java
index a8070c7..9b6ca63 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/statistics/ProtobufClientStatistics.java
+++ b/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/statistics/ProtocolClientStatistics.java
@@ -12,10 +12,12 @@
  * or implied. See the License for the specific language governing permissions and limitations under
  * the License.
  */
-package org.apache.geode.internal.protocol.protobuf.statistics;
+package org.apache.geode.internal.protocol.statistics;
 
-public interface ProtobufClientStatistics {
-  String PROTOBUF_STATS_NAME = "ProtobufStats";
+public interface ProtocolClientStatistics {
+  default String getStatsName() {
+    return "ClientProtocolStats";
+  }
 
   void clientConnected();
 
diff --git a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/Authorizer.java b/geode-protobuf/src/main/proto/handshake_API.proto
similarity index 66%
rename from geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/Authorizer.java
rename to geode-protobuf/src/main/proto/handshake_API.proto
index 3cfb2db..17f7d40 100644
--- a/geode-protobuf/src/main/java/org/apache/geode/internal/protocol/protobuf/security/Authorizer.java
+++ b/geode-protobuf/src/main/proto/handshake_API.proto
@@ -1,7 +1,7 @@
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
  * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance with the License. You may obtain a
  * copy of the License at
  *
@@ -12,10 +12,23 @@
  * or implied. See the License for the specific language governing permissions and limitations under
  * the License.
  */
-package org.apache.geode.internal.protocol.protobuf.security;
 
-import org.apache.geode.security.ResourcePermission;
+syntax = "proto3";
+package org.apache.geode.internal.protocol.protobuf;
 
-public interface Authorizer {
-  boolean authorize(Object authenticatedSubject, ResourcePermission permissionRequested);
+import "basicTypes.proto";
+
+
+enum AuthenticationMode {
+    NONE = 0;
+    SIMPLE = 1;
 }
+
+message HandshakeRequest {
+    Semver version = 1;
+}
+
+message HandshakeResponse {
+    bool ok = 1;
+    Error error = 2; // only set if not OK.
+}
\ No newline at end of file
diff --git a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/ProtobufProtocolServiceJUnitTest.java b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/ProtobufProtocolServiceJUnitTest.java
index d952f0f..91e133d 100644
--- a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/ProtobufProtocolServiceJUnitTest.java
+++ b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/ProtobufProtocolServiceJUnitTest.java
@@ -19,7 +19,7 @@ import static org.junit.Assert.*;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import org.apache.geode.internal.protocol.protobuf.statistics.ProtobufClientStatistics;
+import org.apache.geode.internal.protocol.statistics.ProtocolClientStatistics;
 import org.apache.geode.internal.statistics.DummyStatisticsFactory;
 import org.apache.geode.test.junit.categories.UnitTest;
 
@@ -29,9 +29,9 @@ public class ProtobufProtocolServiceJUnitTest {
   public void initializeStatistics() {
     ProtobufProtocolService service = new ProtobufProtocolService();
     service.initializeStatistics("first", new DummyStatisticsFactory());
-    ProtobufClientStatistics firstStatistics = service.getStatistics();
+    ProtocolClientStatistics firstStatistics = service.getStatistics();
     service.initializeStatistics("second", new DummyStatisticsFactory());
-    ProtobufClientStatistics secondStatistics = service.getStatistics();
+    ProtocolClientStatistics secondStatistics = service.getStatistics();
     assertEquals(firstStatistics, secondStatistics);
   }
 }
diff --git a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/acceptance/CacheConnectionJUnitTest.java b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/acceptance/CacheConnectionJUnitTest.java
index a7d0313..4a76966 100644
--- a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/acceptance/CacheConnectionJUnitTest.java
+++ b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/acceptance/CacheConnectionJUnitTest.java
@@ -34,7 +34,6 @@ import java.util.Collection;
 import java.util.Properties;
 import java.util.concurrent.TimeUnit;
 
-import org.apache.geode.distributed.internal.SecurityConfig;
 import org.awaitility.Awaitility;
 import org.junit.After;
 import org.junit.Before;
@@ -67,7 +66,8 @@ import org.apache.geode.internal.protocol.protobuf.ClientProtocol;
 import org.apache.geode.internal.protocol.protobuf.ProtobufSerializationService;
 import org.apache.geode.internal.protocol.protobuf.RegionAPI;
 import org.apache.geode.internal.protocol.protobuf.serializer.ProtobufProtocolSerializer;
-import org.apache.geode.internal.protocol.protobuf.statistics.ProtobufClientStatistics;
+import org.apache.geode.internal.protocol.protobuf.statistics.ProtobufClientStatisticsImpl;
+import org.apache.geode.internal.protocol.statistics.ProtocolClientStatistics;
 import org.apache.geode.internal.serialization.SerializationService;
 import org.apache.geode.test.junit.categories.IntegrationTest;
 import org.apache.geode.util.test.TestUtil;
@@ -170,7 +170,7 @@ public class CacheConnectionJUnitTest {
     InternalDistributedSystem distributedSystem =
         (InternalDistributedSystem) cache.getDistributedSystem();
     Statistics[] protobufStats = distributedSystem.findStatisticsByType(
-        distributedSystem.findType(ProtobufClientStatistics.PROTOBUF_STATS_NAME));
+        distributedSystem.findType(ProtobufClientStatisticsImpl.PROTOBUF_CLIENT_STATISTICS));
     assertEquals(1, protobufStats.length);
     Statistics statistics = protobufStats[0];
     assertEquals(1, statistics.get("currentClientConnections"));
diff --git a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/acceptance/CacheOperationsJUnitTest.java b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/acceptance/CacheOperationsJUnitTest.java
index 08d648f..d5638ca 100644
--- a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/acceptance/CacheOperationsJUnitTest.java
+++ b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/acceptance/CacheOperationsJUnitTest.java
@@ -251,8 +251,9 @@ public class CacheOperationsJUnitTest {
     RegionAPI.GetRegionNamesRequest getRegionNamesRequest =
         ProtobufRequestUtilities.createGetRegionNamesRequest();
 
-    ClientProtocol.Message getRegionsMessage = ProtobufUtilities.createProtobufMessage(
-        ProtobufUtilities.createProtobufRequestWithGetRegionNamesRequest(getRegionNamesRequest));
+    ClientProtocol.Message getRegionsMessage =
+        ProtobufUtilities.createProtobufMessage(ClientProtocol.Request.newBuilder()
+            .setGetRegionNamesRequest(getRegionNamesRequest).build());
     protobufProtocolSerializer.serialize(getRegionsMessage, outputStream);
     validateGetRegionNamesResponse(socket, protobufProtocolSerializer);
   }
diff --git a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/acceptance/LocatorConnectionDUnitTest.java b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/acceptance/LocatorConnectionDUnitTest.java
index b4be1b6..01dac04 100644
--- a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/acceptance/LocatorConnectionDUnitTest.java
+++ b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/acceptance/LocatorConnectionDUnitTest.java
@@ -40,7 +40,8 @@ import org.apache.geode.internal.protocol.protobuf.ClientProtocol;
 import org.apache.geode.internal.protocol.protobuf.ProtocolErrorCode;
 import org.apache.geode.internal.protocol.protobuf.ServerAPI;
 import org.apache.geode.internal.protocol.protobuf.serializer.ProtobufProtocolSerializer;
-import org.apache.geode.internal.protocol.protobuf.statistics.ProtobufClientStatistics;
+import org.apache.geode.internal.protocol.protobuf.statistics.ProtobufClientStatisticsImpl;
+import org.apache.geode.internal.protocol.statistics.ProtocolClientStatistics;
 import org.apache.geode.internal.protocol.protobuf.utilities.ProtobufRequestUtilities;
 import org.apache.geode.internal.protocol.protobuf.utilities.ProtobufUtilities;
 import org.apache.geode.test.dunit.DistributedTestUtils;
@@ -166,7 +167,7 @@ public class LocatorConnectionDUnitTest extends JUnit4CacheTestCase {
         (InternalDistributedSystem) Locator.getLocator().getDistributedSystem();
 
     Statistics[] protobufServerStats = distributedSystem.findStatisticsByType(
-        distributedSystem.findType(ProtobufClientStatistics.PROTOBUF_STATS_NAME));
+        distributedSystem.findType(ProtobufClientStatisticsImpl.PROTOBUF_CLIENT_STATISTICS));
     assertEquals(1, protobufServerStats.length);
     return protobufServerStats[0];
   }
diff --git a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/HandshakerTest.java b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/HandshakerTest.java
new file mode 100644
index 0000000..6eba760
--- /dev/null
+++ b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/HandshakerTest.java
@@ -0,0 +1,128 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+
+package org.apache.geode.internal.protocol.protobuf;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import org.apache.geode.cache.IncompatibleVersionException;
+import org.apache.geode.internal.protocol.security.Authenticator;
+import org.apache.geode.internal.protocol.security.Authorizer;
+import org.apache.geode.security.AuthenticationFailedException;
+import org.apache.geode.security.AuthenticationRequiredException;
+import org.apache.geode.test.junit.categories.UnitTest;
+
+@Category(UnitTest.class)
+public class HandshakerTest {
+
+  private Map<String, Class<? extends Authenticator>> authenticatorMap;
+  private Handshaker handshaker;
+
+  private static class AuthenticatorMock implements Authenticator {
+
+    @Override
+    public Object authenticate(InputStream inputStream, OutputStream outputStream)
+        throws IOException, AuthenticationFailedException {
+      return null;
+    }
+  }
+
+  private static class SimpleMock extends AuthenticatorMock {
+  }
+
+  private static class NoopMock extends AuthenticatorMock {
+  }
+
+  @Before
+  public void setUp() {
+    handshaker = new Handshaker();
+    assertFalse(handshaker.completed());
+  }
+
+  @Test
+  public void version1_0IsSupported() throws Exception {
+    HandshakeAPI.HandshakeRequest handshakeRequest = HandshakeAPI.HandshakeRequest.newBuilder()
+        .setVersion(HandshakeAPI.Semver.newBuilder().setMajor(1).setMinor(1))
+        .setAuthenticationMode(HandshakeAPI.AuthenticationMode.SIMPLE).build();
+
+    ByteArrayInputStream byteArrayInputStream =
+        ProtobufTestUtilities.messageToByteArrayInputStream(handshakeRequest);
+
+    ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
+
+    handshaker.processHandshake(byteArrayInputStream, byteArrayOutputStream);
+    // assertTrue(actualAuthenticator instanceof NoopMock);
+
+    assertTrue(handshaker.completed());
+  }
+
+  @Test
+  public void version2NotSupported() throws Exception {
+    HandshakeAPI.HandshakeRequest handshakeRequest = HandshakeAPI.HandshakeRequest.newBuilder()
+        .setVersion(HandshakeAPI.Semver.newBuilder().setMajor(2).setMinor(0))
+        .setAuthenticationMode(HandshakeAPI.AuthenticationMode.NONE).build();
+
+    ByteArrayInputStream byteArrayInputStream =
+        ProtobufTestUtilities.messageToByteArrayInputStream(handshakeRequest);
+
+    ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
+
+    handshaker.processHandshake(byteArrayInputStream, byteArrayOutputStream);
+  }
+
+  @Test
+  public void bogusAuthenticationMode() throws Exception {
+    HandshakeAPI.HandshakeRequest handshakeRequest = HandshakeAPI.HandshakeRequest.newBuilder()
+        .setVersion(HandshakeAPI.Semver.newBuilder().setMajor(1).setMinor(0))
+        .setAuthenticationModeValue(-1).build();
+
+    ByteArrayInputStream byteArrayInputStream =
+        ProtobufTestUtilities.messageToByteArrayInputStream(handshakeRequest);
+
+    ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
+
+    handshaker.processHandshake(byteArrayInputStream, byteArrayOutputStream);
+  }
+
+  @Test
+  public void simpleIsSupported() throws Exception {
+    HandshakeAPI.HandshakeRequest handshakeRequest = HandshakeAPI.HandshakeRequest.newBuilder()
+        .setVersion(HandshakeAPI.Semver.newBuilder().setMajor(1).setMinor(0))
+        .setAuthenticationMode(HandshakeAPI.AuthenticationMode.SIMPLE).build();
+
+    ByteArrayInputStream byteArrayInputStream =
+        ProtobufTestUtilities.messageToByteArrayInputStream(handshakeRequest);
+
+    ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
+
+    handshaker.processHandshake(byteArrayInputStream, byteArrayOutputStream);
+    // assertTrue(actualAuthenticator instanceof SimpleMock);
+
+    assertTrue(handshaker.completed());
+  }
+}
diff --git a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufShiroAuthenticatorJUnitTest.java b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufShiroAuthenticatorJUnitTest.java
index 1972e31..419d9fe 100644
--- a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufShiroAuthenticatorJUnitTest.java
+++ b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufShiroAuthenticatorJUnitTest.java
@@ -41,7 +41,7 @@ public class ProtobufShiroAuthenticatorJUnitTest {
   private static final String TEST_USERNAME = "user1";
   private static final String TEST_PASSWORD = "hunter2";
   private ByteArrayInputStream byteArrayInputStream; // initialized with an incoming request in
-                                                     // setUp.
+  // setUp.
   private ByteArrayOutputStream byteArrayOutputStream;
   private ProtobufShiroAuthenticator protobufShiroAuthenticator;
   private SecurityService mockSecurityService;
@@ -70,13 +70,12 @@ public class ProtobufShiroAuthenticatorJUnitTest {
     mockSecurityService = mock(SecurityService.class);
     when(mockSecurityService.login(expectedAuthProperties)).thenReturn(mockSecuritySubject);
 
-    protobufShiroAuthenticator = new ProtobufShiroAuthenticator();
+    protobufShiroAuthenticator = new ProtobufShiroAuthenticator(mockSecurityService);
   }
 
   @Test
   public void successfulAuthentication() throws IOException {
-    protobufShiroAuthenticator.authenticate(byteArrayInputStream, byteArrayOutputStream,
-        mockSecurityService);
+    protobufShiroAuthenticator.authenticate(byteArrayInputStream, byteArrayOutputStream);
 
     AuthenticationAPI.AuthenticationResponse authenticationResponse =
         getSimpleAuthenticationResponse(byteArrayOutputStream);
@@ -89,8 +88,7 @@ public class ProtobufShiroAuthenticatorJUnitTest {
     when(mockSecurityService.login(expectedAuthProperties))
         .thenThrow(new AuthenticationFailedException("BOOM!"));
 
-    protobufShiroAuthenticator.authenticate(byteArrayInputStream, byteArrayOutputStream,
-        mockSecurityService);
+    protobufShiroAuthenticator.authenticate(byteArrayInputStream, byteArrayOutputStream);
   }
 
   @Test
@@ -99,8 +97,7 @@ public class ProtobufShiroAuthenticatorJUnitTest {
     when(mockSecurityService.isClientSecurityRequired()).thenReturn(false);
     when(mockSecurityService.isPeerSecurityRequired()).thenReturn(false);
 
-    protobufShiroAuthenticator.authenticate(byteArrayInputStream, byteArrayOutputStream,
-        mockSecurityService);
+    protobufShiroAuthenticator.authenticate(byteArrayInputStream, byteArrayOutputStream);
 
     AuthenticationAPI.AuthenticationResponse authenticationResponse =
         getSimpleAuthenticationResponse(byteArrayOutputStream);
diff --git a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufStreamProcessorTest.java b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufStreamProcessorTest.java
index 54b4e54..a9578ff 100644
--- a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufStreamProcessorTest.java
+++ b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufStreamProcessorTest.java
@@ -16,8 +16,8 @@ package org.apache.geode.internal.protocol.protobuf;
 
 import org.apache.geode.internal.cache.InternalCache;
 import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
-import org.apache.geode.internal.protocol.protobuf.security.NoOpAuthorizer;
-import org.apache.geode.internal.protocol.protobuf.statistics.NoOpStatistics;
+import org.apache.geode.internal.protocol.security.NoOpAuthorizer;
+import org.apache.geode.internal.protocol.statistics.NoOpStatistics;
 import org.apache.geode.test.junit.categories.UnitTest;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
diff --git a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufTestExecutionContext.java b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufTestExecutionContext.java
index 56beb0e..43b1efa 100644
--- a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufTestExecutionContext.java
+++ b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufTestExecutionContext.java
@@ -14,15 +14,10 @@
  */
 package org.apache.geode.internal.protocol.protobuf;
 
-import com.google.protobuf.GeneratedMessageV3;
 import org.apache.geode.cache.Cache;
 import org.apache.geode.internal.cache.tier.sockets.MessageExecutionContext;
-import org.apache.geode.internal.protocol.protobuf.security.NoOpAuthorizer;
-import org.apache.geode.internal.protocol.protobuf.statistics.NoOpStatistics;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
+import org.apache.geode.internal.protocol.security.NoOpAuthorizer;
+import org.apache.geode.internal.protocol.statistics.NoOpStatistics;
 
 public class ProtobufTestExecutionContext {
   public static MessageExecutionContext getNoAuthExecutionContext(Cache cache) {
diff --git a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufTestUtilities.java b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufTestUtilities.java
new file mode 100644
index 0000000..827599f
--- /dev/null
+++ b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/ProtobufTestUtilities.java
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package org.apache.geode.internal.protocol.protobuf;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+import com.google.protobuf.GeneratedMessageV3;
+
+public class ProtobufTestUtilities {
+  public static ByteArrayInputStream messageToByteArrayInputStream(GeneratedMessageV3 message)
+      throws IOException {
+    ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
+    message.writeDelimitedTo(byteArrayOutputStream);
+    return new ByteArrayInputStream(byteArrayOutputStream.toByteArray());
+  }
+
+
+  public static ClientProtocol.Request createProtobufRequestWithGetRegionNamesRequest(
+      RegionAPI.GetRegionNamesRequest getRegionNamesRequest) {
+    return ClientProtocol.Request.newBuilder().setGetRegionNamesRequest(getRegionNamesRequest)
+        .build();
+  }
+
+  public static void verifyHandshake(InputStream inputStream, OutputStream outputStream,
+      HandshakeAPI.AuthenticationMode authenticationMode) throws IOException {
+    buildHandshakeRequest(authenticationMode).writeDelimitedTo(outputStream);
+
+    HandshakeAPI.HandshakeResponse handshakeResponse =
+        HandshakeAPI.HandshakeResponse.parseDelimitedFrom(inputStream);
+
+    assertTrue(handshakeResponse.getOk());
+    assertFalse(handshakeResponse.hasError());
+  }
+
+  public static HandshakeAPI.HandshakeRequest buildHandshakeRequest(
+      HandshakeAPI.AuthenticationMode authenticationMode) {
+    return HandshakeAPI.HandshakeRequest.newBuilder()
+        .setVersion(HandshakeAPI.Semver.newBuilder().setMajor(1).setMinor(0))
+        .setAuthenticationMode(authenticationMode).build();
+  }
+}
diff --git a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/GetAvailableServersOperationHandlerJUnitTest.java b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/GetAvailableServersOperationHandlerJUnitTest.java
index 5f724d6..393fab8 100644
--- a/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/GetAvailableServersOperationHandlerJUnitTest.java
+++ b/geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/operations/GetAvailableServersOperationHandlerJUnitTest.java
@@ -25,7 +25,7 @@ import org.apache.geode.internal.protocol.protobuf.Result;
 import org.apache.geode.internal.protocol.protobuf.ServerAPI;
 import org.apache.geode.internal.protocol.protobuf.ServerAPI.GetAvailableServersResponse;
 import org.apache.geode.internal.protocol.protobuf.Success;
-import org.apache.geode.internal.protocol.protobuf.statistics.NoOpStatistics;
+import org.apache.geode.internal.protocol.statistics.NoOpStatistics;
 import org.apache.geode.internal.protocol.protobuf.utilities.ProtobufRequestUtilities;
 import org.apache.geode.test.junit.categories.UnitTest;
 import org.junit.Before;

-- 
To stop receiving notification emails like this one, please contact
"commits@geode.apache.org" <co...@geode.apache.org>.