Skip to content

Commit

Permalink
Use https during addition of node when n2n-encryption is enabled
Browse files Browse the repository at this point in the history
Change-Id: I7e2ff1377120e70492946a71a00804654bc2cffc
Reviewed-on: http://review.couchbase.org/c/testrunner/+/160414
Tested-by: Balakumaran G <balakumaran.gopal@couchbase.com>
Reviewed-by: Balakumaran G <balakumaran.gopal@couchbase.com>
(cherry picked from commit 6a26b4f)
Reviewed-on: http://review.couchbase.org/c/testrunner/+/160437
  • Loading branch information
sumedhpb committed Aug 31, 2021
1 parent cbc0d94 commit e906cfb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/Cb_constants/CBServer.py
Expand Up @@ -34,6 +34,7 @@ class CbServer(object):
str(memcached_port): str(ssl_memcached_port),
str(capi_port): str(ssl_capi_port)}
use_https = False
n2n_encryption = False

default_scope = "_default"
default_collection = "_default"
Expand Down
2 changes: 1 addition & 1 deletion lib/membase/api/rest_client.py
Expand Up @@ -1531,7 +1531,7 @@ def remove_all_recoveries(self):
def add_node(self, user='', password='', remoteIp='', port='8091', zone_name='', services=None):
otpNode = None
protocol = "http"
if CbServer.use_https:
if CbServer.use_https or CbServer.n2n_encryption:
port = CbServer.ssl_port
protocol = "https"

Expand Down
5 changes: 5 additions & 0 deletions pytests/security/ntonencryptionBase.py
@@ -1,5 +1,8 @@
from membase.api.rest_client import RestConnection
import logger

from lib.Cb_constants.CBServer import CbServer

log = logger.Logger.get_logger()
import time
from subprocess import Popen, PIPE
Expand Down Expand Up @@ -39,8 +42,10 @@ def ntonencryption_cli(self,servers,status,update_to_all=False):
options = ''
if status == 'enable':
options = '--enable'
CbServer.n2n_encryption = True
elif status == 'disable':
options = '--disable'
CbServer.n2n_encryption = False
elif status == 'get':
options == '--get'

Expand Down

0 comments on commit e906cfb

Please sign in to comment.