-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
configure cert trust #284
configure cert trust #284
Conversation
1521ad8
to
1789a62
Compare
@@ -45,9 +45,9 @@ const __html = '/dist/ziti-console-lib/assets/html'; | |||
|
|||
const loadModule = async (modulePath) => { | |||
try { | |||
return await import(modulePath) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for consistency
@@ -181,7 +181,8 @@ var bindIP = initial.bindIP; | |||
var portTLS = initial.portTLS; | |||
var updateSettings = initial.update; | |||
var settingsPath = initial.location; | |||
var rejectUnauthorized = false; | |||
var rejectUnauthorized = initial.rejectUnauthorized; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
finish implementing rejectUnauthorized (require verifiable TLS server cert from Ziti API)
@@ -410,23 +419,30 @@ function Authenticate(request) { | |||
}; | |||
log("Connecting to: "+serviceUrl+"/authenticate?method=password"); | |||
//if (request.session.creds != null) { | |||
external.post(serviceUrl+"/authenticate?method=password", {json: params , rejectUnauthorized: rejectUnauthorized }, function(err, res, body) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indent
@@ -438,7 +454,7 @@ function Authenticate(request) { | |||
*/ | |||
function GetPath() { | |||
return new Promise(function(resolve, reject) { | |||
external.get(baseUrl+"/edge/management/v1/version", {rejectUnauthorized: rejectUnauthorized}, function(err, res, body) { | |||
external.get(baseUrl+"/edge/management/v1/version", tlsOpts, function(err, res, body) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
always include tlsOpts when calling the Ziti AP
if (err) { | ||
log("Add Controller Error"); | ||
log(err); | ||
response.json( {error: "Edge Controller not Online", errorObj: err} ); | ||
response.json( {error: "error adding edge controller", errorObj: err} ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same error if online and GET fails for any other reason, e.g., TLS
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@dovholuknf This branch completes the broken implementation of cert verification in the console server app and is ready for review. |
fixes #283