Skip to content

Commit d6e86ff

Browse files
committed
Updated various icert/iclient/imgr/iswift godoc's
1 parent d14938c commit d6e86ff

File tree

7 files changed

+102
-6
lines changed

7 files changed

+102
-6
lines changed

icert/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ A `-ttl` must be specified.
4747

4848
Both `-caCert` and `-caKey` must be specified.
4949

50-
if `-ca` is specified:
50+
If `-ca` is specified:
5151
* neither `-cert` nor `key` may be specified
52-
* no `-dns` or `-ip` may be specified
52+
* neither `-dns` nor `-ip` may be specified
5353

5454
If `-ca` is not specified:
5555
* both `-cert` and `-key` must be specified

icert/icertpkg/api.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
// Copyright (c) 2015-2021, NVIDIA CORPORATION.
22
// SPDX-License-Identifier: Apache-2.0
33

4+
// Package icertpkg provides functions to generate certificates compatible
5+
// with standard TLS and HTTPS packages. Functions are provided to create
6+
// RootCA certificates that may then subsequently be used to generate
7+
// endpoint certificates signed by a RootCA. The functions are designed to
8+
// work with either on-disk PEM files and/or in-memory PEM blocks (byte slices).
9+
//
410
// Inspired by https://shaneutt.com/blog/golang-ca-and-signed-cert-go/
5-
11+
//
612
package icertpkg
713

814
import (
@@ -33,7 +39,7 @@ const (
3339
// GeneratedFilePerm is the permission bits that, after the application
3440
// of umask, will specify the mode of the created cert|key files.
3541
//
36-
GeneratedFilePerm = 0644
42+
GeneratedFilePerm = 0400
3743
)
3844

3945
// GenCACert is called to generate a Certificate Authority using the requested

icert/main.go

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,57 @@
11
// Copyright (c) 2015-2021, NVIDIA CORPORATION.
22
// SPDX-License-Identifier: Apache-2.0
33

4+
// Program icert provides a command-line wrapper around package icertpkg APIs.
5+
//
6+
// The following can be obtained by running the "icert -h" command:
7+
//
8+
// Usage of icert:
9+
// -ca
10+
// generated CA Certicate usable for signing Endpoint Certificates
11+
// -caCert string
12+
// path to CA Certificate
13+
// -caKey string
14+
// path to CA Certificate's PrivateKey
15+
// -cert string
16+
// path to Endpoint Certificate
17+
// -country value
18+
// generated Certificate's Subject.Country
19+
// -dns value
20+
// generated Certificate's DNS Name
21+
// -ed25519
22+
// generate key via Ed25519
23+
// -ip value
24+
// generated Certificate's IP Address
25+
// -key string
26+
// path to Endpoint Certificate's PrivateKey
27+
// -locality value
28+
// generated Certificate's Subject.Locality
29+
// -organization value
30+
// generated Certificate's Subject.Organization
31+
// -postalCode value
32+
// generated Certificate's Subject.PostalCode
33+
// -province value
34+
// generated Certificate's Subject.Province
35+
// -rsa
36+
// generate key via RSA
37+
// -streetAddress value
38+
// generated Certificate's Subject.StreetAddress
39+
// -ttl uint
40+
// generated Certificate's time to live in days
41+
// -v verbose mode
42+
//
43+
// Precisely one of "-ed25519" or "-rsa" must be specified.
44+
//
45+
// A "-ttl" must be specified.
46+
//
47+
// Both "-caCert" and "-caKey" must be specified.
48+
//
49+
// If "-ca" is specified, none of "-cert" nor "key" may be specified.
50+
// Similarly, neither "-dns" nor "-ip" may be specified.
51+
//
52+
// If "-ca" is not specified, both "-cert" and "-key" must be specified.
53+
// Similarly, at least one "-dns" and/or one "-ip" must be specified.
54+
//
455
package main
556

657
import (

iclient/main.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
// Copyright (c) 2015-2021, NVIDIA CORPORATION.
22
// SPDX-License-Identifier: Apache-2.0
33

4+
// Program iclient provides a command-line wrapper around package iclientpkg APIs.
5+
//
6+
// The program requires a single argument that is a path to a package config
7+
// formatted configuration to load. Optionally, overrides the the config may
8+
// be passed as additional arguments in the form <section_name>.<option_name>=<value>.
9+
//
410
package main
511

612
func main() {}

imgr/main.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
// Copyright (c) 2015-2021, NVIDIA CORPORATION.
22
// SPDX-License-Identifier: Apache-2.0
33

4+
// Program imgr provides a command-line wrapper around package imgrpkg APIs.
5+
//
6+
// The program requires a single argument that is a path to a package config
7+
// formatted configuration to load. Optionally, overrides the the config may
8+
// be passed as additional arguments in the form <section_name>.<option_name>=<value>.
9+
//
410
package main
511

612
import (

iswift/iswiftpkg/api.go

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,48 @@
11
// Copyright (c) 2015-2021, NVIDIA CORPORATION.
22
// SPDX-License-Identifier: Apache-2.0
33

4+
// Package iswiftpkg implements an emulation of OpenStack Swift by presenting
5+
// a Swift Proxy responding to a minimal set of base OpenStack Swift HTTP
6+
// methods. While there is no support for TLS, a simple Auth functionality
7+
// is provided and its usage is enforced.
8+
//
9+
// To configure an iswiftpkg instance, Start() is called passing, as the sole
10+
// argument, a package conf ConfMap. Here is a sample .conf file:
11+
//
12+
// [ISWIFT]
13+
// SwiftProxyIPAddr: 127.0.0.1
14+
// SwiftProxyTCPPort: 8080
15+
//
16+
// MaxAccountNameLength: 256
17+
// MaxContainerNameLength: 256
18+
// MaxObjectNameLength: 1024
19+
// AccountListingLimit: 10000
20+
// ContainerListingLimit: 10000
21+
//
422
package iswiftpkg
523

624
import (
725
"github.com/NVIDIA/proxyfs/conf"
826
)
927

1028
// Start is called to start serving the NoAuth Swift Proxy Port and,
11-
// optionally, the Auth Swift Proxy Port
29+
// optionally, the Auth Swift Proxy Port.
1230
//
1331
func Start(confMap conf.ConfMap) (err error) {
1432
err = start(confMap)
1533
return
1634
}
1735

18-
// Stop is called to stop serving
36+
// Stop is called to stop serving.
1937
//
2038
func Stop() (err error) {
2139
err = stop()
2240
return
2341
}
2442

43+
// ForceReAuth is called to force a "401 Unauthorized" response to a
44+
// client's subsequent request forcing the client to reauthenticate.
45+
//
2546
func ForceReAuth() {
2647
forceReAuth()
2748
}

iswift/main.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
// Copyright (c) 2015-2021, NVIDIA CORPORATION.
22
// SPDX-License-Identifier: Apache-2.0
33

4+
// Program iswift provides a command-line wrapper around package iswiftpkg APIs.
5+
//
6+
// The program requires a single argument that is a path to a package config
7+
// formatted configuration to load. Optionally, overrides the the config may
8+
// be passed as additional arguments in the form <section_name>.<option_name>=<value>.
9+
//
410
package main
511

612
import (

0 commit comments

Comments
 (0)