Add client with cert auth support and adding API call to get public-key from Blackduck#17
Open
aclairekeum wants to merge 12 commits intomasterfrom
Open
Add client with cert auth support and adding API call to get public-key from Blackduck#17aclairekeum wants to merge 12 commits intomasterfrom
aclairekeum wants to merge 12 commits intomasterfrom
Conversation
robpacheco
approved these changes
Aug 30, 2018
mattfenwick
approved these changes
Sep 4, 2018
Contributor
mattfenwick
left a comment
There was a problem hiding this comment.
🎉 🎉 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") |
Contributor
There was a problem hiding this comment.
Just curious: why are errors logged with Warn?
| @@ -0,0 +1,6 @@ | |||
| package hubapi | |||
Contributor
There was a problem hiding this comment.
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.
tandr
reviewed
Aug 5, 2019
| } | ||
|
|
||
| c.doPreRequest(req) | ||
| log.Debugf("POST Request: %+v.", req) |
Contributor
There was a problem hiding this comment.
If this call will log request's headers, they will contain basic auth header, and will be visible in a log file too
Contributor
|
@mattfenwick -- thoughts on cleaning it up, and maybe merging? Or closing... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added clients with cert auth, with auth token and without auth token.
Added API call to retrieve the public-key from Blackduck