-
Notifications
You must be signed in to change notification settings - Fork 21
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
Add client with cert auth support and adding API call to get public-key from Blackduck #17
base: master
Are you sure you want to change the base?
Conversation
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.
🎉 🎉 Nice work @aclairekeum !!!!
func ConfigureTLSWithCerts(systemCert string, systemKey string, cacert string, insecure bool) (*tls.Config, error) { | ||
cert, err := tls.LoadX509KeyPair(systemCert, systemKey) | ||
if err != nil { | ||
log.Warnf("Cannot load system cert and key file") |
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.
Just curious: why are errors logged with Warn
?
@@ -0,0 +1,6 @@ | |||
package hubapi |
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.
Do these files need this little license header?
// Copyright 2018 Synopsys, Inc.
//
// Licensed 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.
} | ||
|
||
c.doPreRequest(req) | ||
log.Debugf("POST Request: %+v.", req) |
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.
If this call will log request's headers, they will contain basic auth header, and will be visible in a log file too
@mattfenwick -- thoughts on cleaning it up, and maybe merging? Or closing... |
Added clients with cert auth, with auth token and without auth token.
Added API call to retrieve the public-key from Blackduck