-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[API change] show TLS certificate details; add top-level 'ais tls' co…
…mmand * Go API: add api/x509 source: - `api.LoadX509Cert` - `api.GetX509Info` * CLI: add cmd/cli/cli/x509; consolidate all TLS in there * CLI: add top-level `ais tls`; update all related docs and references * prev. commit sequence: 3f3e502 * separately: - aistore as reverse-proxy is obsolete - update the docs, add disclaimer - related (very old) commit: 2cc8212 Signed-off-by: Alex Aizman <[email protected]>
- Loading branch information
1 parent
c0faf87
commit 091f7b0
Showing
28 changed files
with
494 additions
and
247 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// Package api provides native Go-based API/SDK over HTTP(S). | ||
/* | ||
* Copyright (c) 2024, NVIDIA CORPORATION. All rights reserved. | ||
*/ | ||
package api | ||
|
||
import ( | ||
"net/http" | ||
"net/url" | ||
|
||
"github.com/NVIDIA/aistore/api/apc" | ||
"github.com/NVIDIA/aistore/cmn/cos" | ||
) | ||
|
||
func LoadX509Cert(bp BaseParams, nodeID ...string) error { | ||
bp.Method = http.MethodPut | ||
reqParams := AllocRp() | ||
{ | ||
reqParams.BaseParams = bp | ||
if len(nodeID) > 0 { | ||
reqParams.Path = apc.URLPathCluX509.Join(nodeID[0]) // the node | ||
} else { | ||
reqParams.Path = apc.URLPathCluX509.S // all nodes | ||
} | ||
} | ||
err := reqParams.DoRequest() | ||
FreeRp(reqParams) | ||
return err | ||
} | ||
|
||
func GetX509Info(bp BaseParams, nodeID ...string) (info cos.StrKVs, err error) { | ||
bp.Method = http.MethodGet | ||
reqParams := AllocRp() | ||
{ | ||
reqParams.BaseParams = bp | ||
reqParams.Query = url.Values{apc.QparamWhat: []string{apc.WhatCertificate}} | ||
if len(nodeID) > 0 { | ||
reqParams.Path = apc.URLPathReverseDae.S | ||
reqParams.Header = http.Header{ | ||
apc.HdrNodeID: []string{nodeID[0]}, | ||
} | ||
} else { | ||
reqParams.Path = apc.URLPathDae.S | ||
} | ||
} | ||
_, err = reqParams.DoReqAny(&info) | ||
FreeRp(reqParams) | ||
return | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -113,6 +113,7 @@ var ( | |
showCmdRemoteAIS, | ||
showCmdJob, | ||
showCmdLog, | ||
showTLS, | ||
}, | ||
} | ||
|
||
|
Oops, something went wrong.