Merge "services/mgmt/lib/acls: fix a dependency violation"
diff --git a/cmd/application/doc.go b/cmd/application/doc.go
index b993352..eb474ad 100644
--- a/cmd/application/doc.go
+++ b/cmd/application/doc.go
@@ -36,6 +36,28 @@
logs at or above this threshold go to stderr
-v=0
log level for V logs
+ -v23.credentials=
+ directory to use for storing security credentials
+ -v23.i18n-catalogue=
+ 18n catalogue files to load, comma separated
+ -v23.namespace.root=[/ns.dev.v.io:8101]
+ local namespace root; can be repeated to provided multiple roots
+ -v23.proxy=
+ object name of proxy service to use to export services across network
+ boundaries
+ -v23.tcp.address=
+ address to listen on
+ -v23.tcp.protocol=wsh
+ protocol to listen with
+ -v23.vtrace.cache-size=1024
+ The number of vtrace traces to store in memory.
+ -v23.vtrace.collect-regexp=
+ Spans and annotations that match this regular expression will trigger trace
+ collection.
+ -v23.vtrace.dump-on-shutdown=true
+ If true, dump all stored traces on runtime shutdown.
+ -v23.vtrace.sample-rate=0
+ Rate (from 0.0 to 1.0) to sample vtrace traces.
-vanadium.i18n_catalogue=
18n catalogue files to load, comma separated
-veyron.credentials=
diff --git a/cmd/binary/doc.go b/cmd/binary/doc.go
index f82f79d..5f85f8c 100644
--- a/cmd/binary/doc.go
+++ b/cmd/binary/doc.go
@@ -34,6 +34,28 @@
logs at or above this threshold go to stderr
-v=0
log level for V logs
+ -v23.credentials=
+ directory to use for storing security credentials
+ -v23.i18n-catalogue=
+ 18n catalogue files to load, comma separated
+ -v23.namespace.root=[/ns.dev.v.io:8101]
+ local namespace root; can be repeated to provided multiple roots
+ -v23.proxy=
+ object name of proxy service to use to export services across network
+ boundaries
+ -v23.tcp.address=
+ address to listen on
+ -v23.tcp.protocol=wsh
+ protocol to listen with
+ -v23.vtrace.cache-size=1024
+ The number of vtrace traces to store in memory.
+ -v23.vtrace.collect-regexp=
+ Spans and annotations that match this regular expression will trigger trace
+ collection.
+ -v23.vtrace.dump-on-shutdown=true
+ If true, dump all stored traces on runtime shutdown.
+ -v23.vtrace.sample-rate=0
+ Rate (from 0.0 to 1.0) to sample vtrace traces.
-vanadium.i18n_catalogue=
18n catalogue files to load, comma separated
-veyron.credentials=
diff --git a/cmd/build/doc.go b/cmd/build/doc.go
index 0980385..300e8aa 100644
--- a/cmd/build/doc.go
+++ b/cmd/build/doc.go
@@ -31,6 +31,28 @@
logs at or above this threshold go to stderr
-v=0
log level for V logs
+ -v23.credentials=
+ directory to use for storing security credentials
+ -v23.i18n-catalogue=
+ 18n catalogue files to load, comma separated
+ -v23.namespace.root=[/ns.dev.v.io:8101]
+ local namespace root; can be repeated to provided multiple roots
+ -v23.proxy=
+ object name of proxy service to use to export services across network
+ boundaries
+ -v23.tcp.address=
+ address to listen on
+ -v23.tcp.protocol=wsh
+ protocol to listen with
+ -v23.vtrace.cache-size=1024
+ The number of vtrace traces to store in memory.
+ -v23.vtrace.collect-regexp=
+ Spans and annotations that match this regular expression will trigger trace
+ collection.
+ -v23.vtrace.dump-on-shutdown=true
+ If true, dump all stored traces on runtime shutdown.
+ -v23.vtrace.sample-rate=0
+ Rate (from 0.0 to 1.0) to sample vtrace traces.
-vanadium.i18n_catalogue=
18n catalogue files to load, comma separated
-veyron.credentials=
diff --git a/cmd/debug/debug_v23_test.go b/cmd/debug/debug_v23_test.go
index 592f7d3..ac3519b 100644
--- a/cmd/debug/debug_v23_test.go
+++ b/cmd/debug/debug_v23_test.go
@@ -20,7 +20,7 @@
//go:generate v23 test generate
func V23TestDebugGlob(i *v23tests.T) {
- v23tests.RunRootMT(i, "--veyron.tcp.address=127.0.0.1:0")
+ v23tests.RunRootMT(i, "--v23.tcp.address=127.0.0.1:0")
binary := i.BuildV23Pkg("v.io/x/ref/cmd/debug")
inv := binary.Start("glob", "__debug/*")
@@ -35,7 +35,7 @@
}
func V23TestDebugGlobLogs(i *v23tests.T) {
- v23tests.RunRootMT(i, "--veyron.tcp.address=127.0.0.1:0")
+ v23tests.RunRootMT(i, "--v23.tcp.address=127.0.0.1:0")
// Create a temp file before we list the logs.
fileName := filepath.Base(i.NewTempFile().Name())
@@ -50,7 +50,7 @@
}
func V23TestReadHostname(i *v23tests.T) {
- v23tests.RunRootMT(i, "--veyron.tcp.address=127.0.0.1:0")
+ v23tests.RunRootMT(i, "--v23.tcp.address=127.0.0.1:0")
path := "__debug/stats/system/hostname"
binary := i.BuildV23Pkg("v.io/x/ref/cmd/debug")
@@ -74,7 +74,7 @@
}
func V23TestLogSize(i *v23tests.T) {
- v23tests.RunRootMT(i, "--veyron.tcp.address=127.0.0.1:0")
+ v23tests.RunRootMT(i, "--v23.tcp.address=127.0.0.1:0")
binary := i.BuildV23Pkg("v.io/x/ref/cmd/debug")
testLogData := "This is a test log file"
@@ -93,7 +93,7 @@
}
func V23TestStatsRead(i *v23tests.T) {
- v23tests.RunRootMT(i, "--veyron.tcp.address=127.0.0.1:0")
+ v23tests.RunRootMT(i, "--v23.tcp.address=127.0.0.1:0")
binary := i.BuildV23Pkg("v.io/x/ref/cmd/debug")
testLogData := "This is a test log file\n"
@@ -113,7 +113,7 @@
}
func V23TestStatsWatch(i *v23tests.T) {
- v23tests.RunRootMT(i, "--veyron.tcp.address=127.0.0.1:0")
+ v23tests.RunRootMT(i, "--v23.tcp.address=127.0.0.1:0")
binary := i.BuildV23Pkg("v.io/x/ref/cmd/debug")
testLogData := "This is a test log file\n"
@@ -148,11 +148,11 @@
}
func performTracedRead(debugBinary *v23tests.Binary, path string) string {
- return debugBinary.Start("--veyron.vtrace.sample_rate=1", "logs", "read", path).Output()
+ return debugBinary.Start("--v23.vtrace.sample-rate=1", "logs", "read", path).Output()
}
func V23TestVTrace(i *v23tests.T) {
- v23tests.RunRootMT(i, "--veyron.tcp.address=127.0.0.1:0")
+ v23tests.RunRootMT(i, "--v23.tcp.address=127.0.0.1:0")
binary := i.BuildV23Pkg("v.io/x/ref/cmd/debug")
logContent := "Hello, world!\n"
@@ -205,7 +205,7 @@
}
func V23TestPprof(i *v23tests.T) {
- v23tests.RunRootMT(i, "--veyron.tcp.address=127.0.0.1:0")
+ v23tests.RunRootMT(i, "--v23.tcp.address=127.0.0.1:0")
binary := i.BuildV23Pkg("v.io/x/ref/cmd/debug")
inv := binary.Start("pprof", "run", "__debug/pprof", "heap", "--text")
diff --git a/cmd/debug/doc.go b/cmd/debug/doc.go
index 8c78afd..bdb3a7b 100644
--- a/cmd/debug/doc.go
+++ b/cmd/debug/doc.go
@@ -35,6 +35,28 @@
logs at or above this threshold go to stderr
-v=0
log level for V logs
+ -v23.credentials=
+ directory to use for storing security credentials
+ -v23.i18n-catalogue=
+ 18n catalogue files to load, comma separated
+ -v23.namespace.root=[/ns.dev.v.io:8101]
+ local namespace root; can be repeated to provided multiple roots
+ -v23.proxy=
+ object name of proxy service to use to export services across network
+ boundaries
+ -v23.tcp.address=
+ address to listen on
+ -v23.tcp.protocol=wsh
+ protocol to listen with
+ -v23.vtrace.cache-size=1024
+ The number of vtrace traces to store in memory.
+ -v23.vtrace.collect-regexp=
+ Spans and annotations that match this regular expression will trigger trace
+ collection.
+ -v23.vtrace.dump-on-shutdown=true
+ If true, dump all stored traces on runtime shutdown.
+ -v23.vtrace.sample-rate=0
+ Rate (from 0.0 to 1.0) to sample vtrace traces.
-vanadium.i18n_catalogue=
18n catalogue files to load, comma separated
-veyron.credentials=
diff --git a/cmd/gclogs/doc.go b/cmd/gclogs/doc.go
index eb15ca1..b46e899 100644
--- a/cmd/gclogs/doc.go
+++ b/cmd/gclogs/doc.go
@@ -47,6 +47,33 @@
logs at or above this threshold go to stderr
-v=0
log level for V logs
+ -v23.credentials=
+ directory to use for storing security credentials
+ -v23.i18n-catalogue=
+ 18n catalogue files to load, comma separated
+ -v23.namespace.root=[/ns.dev.v.io:8101]
+ local namespace root; can be repeated to provided multiple roots
+ -v23.permissions.file=map[]
+ specify an acl file as <name>:<aclfile>
+ -v23.permissions.literal=
+ explicitly specify the runtime acl as a JSON-encoded access.Permissions.
+ Overrides all --v23.permissions.file flags.
+ -v23.proxy=
+ object name of proxy service to use to export services across network
+ boundaries
+ -v23.tcp.address=
+ address to listen on
+ -v23.tcp.protocol=wsh
+ protocol to listen with
+ -v23.vtrace.cache-size=1024
+ The number of vtrace traces to store in memory.
+ -v23.vtrace.collect-regexp=
+ Spans and annotations that match this regular expression will trigger trace
+ collection.
+ -v23.vtrace.dump-on-shutdown=true
+ If true, dump all stored traces on runtime shutdown.
+ -v23.vtrace.sample-rate=0
+ Rate (from 0.0 to 1.0) to sample vtrace traces.
-vanadium.i18n_catalogue=
18n catalogue files to load, comma separated
-veyron.acl.file=map[]
diff --git a/cmd/mgmt/device/devicex b/cmd/mgmt/device/devicex
index e70c0e2..7e53c30 100755
--- a/cmd/mgmt/device/devicex
+++ b/cmd/mgmt/device/devicex
@@ -16,21 +16,21 @@
echo "usage:"
echo
echo "Install device manager:"
- echo "VANADIUM_DEVICE_DIR=<installation dir> ./devicex install [<binary source>] [ args for installer... ] [ -- args for device manager...]"
+ echo "V23_DEVICE_DIR=<installation dir> ./devicex install [<binary source>] [ args for installer... ] [ -- args for device manager...]"
echo " Possible values for <binary source>:"
echo " unspecified: get binaries from local repository"
echo " /path/to/binaries: get binaries from local filesystem"
echo " http://host/path: get binaries from HTTP server"
echo
echo "Uninstall device manager:"
- echo "VANADIUM_DEVICE_DIR=<installation dir> ./devicex uninstall"
+ echo "V23_DEVICE_DIR=<installation dir> ./devicex uninstall"
echo
echo "Start device manager:"
- echo "VANADIUM_DEVICE_DIR=<installation dir> ./devicex start"
+ echo "V23_DEVICE_DIR=<installation dir> ./devicex start"
echo
echo "Stop device manager:"
- echo "VANADIUM_DEVICE_DIR=<installation dir> ./devicex stop"
- echo "VANADIUM_DEVICE_DIR should be 0711 when running in multi-user"
+ echo "V23_DEVICE_DIR=<installation dir> ./devicex stop"
+ echo "V23_DEVICE_DIR should be 0711 when running in multi-user"
echo "mode and all of its parents directories need to be at least"
echo "0511."
}
@@ -72,10 +72,10 @@
}
###############################################################################
-# Runs a command as the device manager user. Assumes VANADIUM_DEVICE_DIR exists
+# Runs a command as the device manager user. Assumes V23_DEVICE_DIR exists
# and gets the device manager user from the owner of that directory.
# Globals:
-# VANADIUM_DEVICE_DIR
+# V23_DEVICE_DIR
# Arguments:
# command to run and its arguments
# Returns:
@@ -88,7 +88,7 @@
else
sudo -u "${devmgr_user}" \
V23_NAMESPACE="${V23_NAMESPACE}" \
- VANADIUM_DEVICE_DIR="${VANADIUM_DEVICE_DIR}" \
+ V23_DEVICE_DIR="${V23_DEVICE_DIR}" \
"$@"
fi
}
@@ -183,7 +183,7 @@
# Installs device manager: fetches binaries, configures suidhelper, calls the
# install command on deviced.
# Globals:
-# VANADIUM_DEVICE_DIR
+# V23_DEVICE_DIR
# Arguments:
# source of binaries (optional)
# args for install command and for device manager (optional)
@@ -191,12 +191,12 @@
# None
###############################################################################
install() {
- if [[ -e "${VANADIUM_DEVICE_DIR}" ]]; then
- echo "${VANADIUM_DEVICE_DIR} already exists!"
+ if [[ -e "${V23_DEVICE_DIR}" ]]; then
+ echo "${V23_DEVICE_DIR} already exists!"
exit 1
fi
- mkdir -m 711 "${VANADIUM_DEVICE_DIR}"
- local -r BIN_INSTALL="${VANADIUM_DEVICE_DIR}/bin"
+ mkdir -m 711 "${V23_DEVICE_DIR}"
+ local -r BIN_INSTALL="${V23_DEVICE_DIR}/bin"
mkdir -m 700 "${BIN_INSTALL}"
# Fetch the binaries.
@@ -249,7 +249,7 @@
fi
local -r SETUID_SCRIPT="${BIN_INSTALL}/suidhelper"
if [[ ${SINGLE_USER} == false ]]; then
- portable_chown -R "${DEVMGR_USER}:${DEVMGR_USER}" "${VANADIUM_DEVICE_DIR}"
+ portable_chown -R "${DEVMGR_USER}:${DEVMGR_USER}" "${V23_DEVICE_DIR}"
make_suid "${SETUID_SCRIPT}"
fi
local -r INIT_SCRIPT="${BIN_INSTALL}/inithelper"
@@ -259,8 +259,8 @@
echo "Helpers configured."
# Install the device manager.
- echo "Installing device manager under ${VANADIUM_DEVICE_DIR} ..."
- echo "VANADIUM_DEVICE_DIR=${VANADIUM_DEVICE_DIR}"
+ echo "Installing device manager under ${V23_DEVICE_DIR} ..."
+ echo "V23_DEVICE_DIR=${V23_DEVICE_DIR}"
run "${BIN_INSTALL}/deviced" install \
--suid_helper="${SETUID_SCRIPT}" \
--agent="${BIN_INSTALL}/agentd" \
@@ -271,7 +271,7 @@
###############################################################################
# Determines the owner of the device manager
# Globals:
-# VANADIUM_DEVICE_DIR
+# V23_DEVICE_DIR
# Arguments:
# None
# Returns:
@@ -280,10 +280,10 @@
getdevowner() {
case "$(uname)" in
"Darwin")
- ls -dl "${VANADIUM_DEVICE_DIR}" | awk '{print $3}'
+ ls -dl "${V23_DEVICE_DIR}" | awk '{print $3}'
;;
"Linux")
- stat -c "%U" "${VANADIUM_DEVICE_DIR}"
+ stat -c "%U" "${V23_DEVICE_DIR}"
;;
esac
}
@@ -292,78 +292,78 @@
# Uninstalls device manager: calls the uninstall command of deviced and removes
# the installation.
# Globals:
-# VANADIUM_DEVICE_DIR
+# V23_DEVICE_DIR
# Arguments:
# None
# Returns:
# None
###############################################################################
uninstall() {
- if [[ ! -d "${VANADIUM_DEVICE_DIR}" ]]; then
- echo "${VANADIUM_DEVICE_DIR} does not exist or is not a directory!"
+ if [[ ! -d "${V23_DEVICE_DIR}" ]]; then
+ echo "${V23_DEVICE_DIR} does not exist or is not a directory!"
exit 1
fi
- local -r BIN_INSTALL="${VANADIUM_DEVICE_DIR}/bin"
+ local -r BIN_INSTALL="${V23_DEVICE_DIR}/bin"
local -r SETUID_SCRIPT="${BIN_INSTALL}/suidhelper"
- echo "Uninstalling device manager from ${VANADIUM_DEVICE_DIR} ..."
+ echo "Uninstalling device manager from ${V23_DEVICE_DIR} ..."
run "${BIN_INSTALL}/deviced" uninstall \
--suid_helper="${SETUID_SCRIPT}"
echo "Device manager uninstalled."
- # Any data created underneath "${VANADIUM_DEVICE_DIR}" by the "deviced
+ # Any data created underneath "${V23_DEVICE_DIR}" by the "deviced
# install" command would have been cleaned up already by "deviced uninstall".
- # However, install() created "${VANADIUM_DEVICE_DIR}", so uninstall() needs
+ # However, install() created "${V23_DEVICE_DIR}", so uninstall() needs
# to remove it (as well as data created by install(), like bin/*).
- run rm -rf "${VANADIUM_DEVICE_DIR}/bin"
- rmdir "${VANADIUM_DEVICE_DIR}"
- echo "Removed ${VANADIUM_DEVICE_DIR}"
+ run rm -rf "${V23_DEVICE_DIR}/bin"
+ rmdir "${V23_DEVICE_DIR}"
+ echo "Removed ${V23_DEVICE_DIR}"
}
###############################################################################
# Starts device manager: calls the start command of deviced.
# Globals:
-# VANADIUM_DEVICE_DIR
+# V23_DEVICE_DIR
# Arguments:
# None
# Returns:
# None
###############################################################################
start() {
- if [[ ! -d "${VANADIUM_DEVICE_DIR}" ]]; then
- echo "${VANADIUM_DEVICE_DIR} does not exist or is not a directory!"
+ if [[ ! -d "${V23_DEVICE_DIR}" ]]; then
+ echo "${V23_DEVICE_DIR} does not exist or is not a directory!"
exit 1
fi
- local -r BIN_INSTALL="${VANADIUM_DEVICE_DIR}/bin"
+ local -r BIN_INSTALL="${V23_DEVICE_DIR}/bin"
run "${BIN_INSTALL}/deviced" start
}
###############################################################################
# Stops device manager: calls the stop command of deviced.
# Globals:
-# VANADIUM_DEVICE_DIR
+# V23_DEVICE_DIR
# Arguments:
# None
# Returns:
# None
###############################################################################
stop() {
- if [[ ! -d "${VANADIUM_DEVICE_DIR}" ]]; then
- echo "${VANADIUM_DEVICE_DIR} does not exist or is not a directory!"
+ if [[ ! -d "${V23_DEVICE_DIR}" ]]; then
+ echo "${V23_DEVICE_DIR} does not exist or is not a directory!"
exit 1
fi
- local -r BIN_INSTALL="${VANADIUM_DEVICE_DIR}/bin"
+ local -r BIN_INSTALL="${V23_DEVICE_DIR}/bin"
run "${BIN_INSTALL}/deviced" stop
}
main() {
- if [[ -z "${VANADIUM_DEVICE_DIR}" ]]; then
+ if [[ -z "${V23_DEVICE_DIR}" ]]; then
echo 'No local device installation dir specified!'
usage
exit 1
fi
- if [[ -e "${VANADIUM_DEVICE_DIR}" && ! -d "${VANADIUM_DEVICE_DIR}" ]]; then
- echo "${VANADIUM_DEVICE_DIR} is not a directory!"
+ if [[ -e "${V23_DEVICE_DIR}" && ! -d "${V23_DEVICE_DIR}" ]]; then
+ echo "${V23_DEVICE_DIR} is not a directory!"
usage
exit 1
fi
diff --git a/cmd/mgmt/device/doc.go b/cmd/mgmt/device/doc.go
index 178bfd8..42a8873 100644
--- a/cmd/mgmt/device/doc.go
+++ b/cmd/mgmt/device/doc.go
@@ -48,6 +48,33 @@
logs at or above this threshold go to stderr
-v=0
log level for V logs
+ -v23.credentials=
+ directory to use for storing security credentials
+ -v23.i18n-catalogue=
+ 18n catalogue files to load, comma separated
+ -v23.namespace.root=[/ns.dev.v.io:8101]
+ local namespace root; can be repeated to provided multiple roots
+ -v23.permissions.file=map[]
+ specify an acl file as <name>:<aclfile>
+ -v23.permissions.literal=
+ explicitly specify the runtime acl as a JSON-encoded access.Permissions.
+ Overrides all --v23.permissions.file flags.
+ -v23.proxy=
+ object name of proxy service to use to export services across network
+ boundaries
+ -v23.tcp.address=
+ address to listen on
+ -v23.tcp.protocol=wsh
+ protocol to listen with
+ -v23.vtrace.cache-size=1024
+ The number of vtrace traces to store in memory.
+ -v23.vtrace.collect-regexp=
+ Spans and annotations that match this regular expression will trigger trace
+ collection.
+ -v23.vtrace.dump-on-shutdown=true
+ If true, dump all stored traces on runtime shutdown.
+ -v23.vtrace.sample-rate=0
+ Rate (from 0.0 to 1.0) to sample vtrace traces.
-vanadium.i18n_catalogue=
18n catalogue files to load, comma separated
-veyron.acl.file=map[]
diff --git a/cmd/mgmt/device/local_install.go b/cmd/mgmt/device/local_install.go
index 90d24a1..2116d91 100644
--- a/cmd/mgmt/device/local_install.go
+++ b/cmd/mgmt/device/local_install.go
@@ -247,7 +247,7 @@
//
// It sets up an app and binary server that only lives for the duration of the
// command, and listens on the profile's listen spec. The caller should set the
-// --veyron.proxy if the machine running the command is not accessible from the
+// --v23.proxy if the machine running the command is not accessible from the
// device manager.
//
// TODO(caprita/ashankar): We should use bi-directional streams to get this
diff --git a/cmd/mgmt/mgmt_v23_test.go b/cmd/mgmt/mgmt_v23_test.go
index eff4887..860f478 100644
--- a/cmd/mgmt/mgmt_v23_test.go
+++ b/cmd/mgmt/mgmt_v23_test.go
@@ -98,12 +98,12 @@
// waiting to be claimed.
//
// Other binaries, like applicationd and binaryd will be run by alice.
- deviceScript = i.BinaryFromPath("device/devicex").WithEnv("VANADIUM_DEVICE_DIR=" + dmInstallDir)
+ deviceScript = i.BinaryFromPath("device/devicex").WithEnv("V23_DEVICE_DIR=" + dmInstallDir)
mtName = "devices/" + hostname // Name under which the device manager will publish itself.
)
- v23tests.RunRootMT(i, "--veyron.tcp.address=127.0.0.1:0")
+ v23tests.RunRootMT(i, "--v23.tcp.address=127.0.0.1:0")
buildAndCopyBinaries(
i,
binStagingDir,
@@ -121,7 +121,7 @@
userFlag,
"--origin="+devicedAppName,
"--",
- "--veyron.tcp.address=127.0.0.1:0",
+ "--v23.tcp.address=127.0.0.1:0",
"--neighborhood_name="+fmt.Sprintf("%s-%d-%d", hostname, os.Getpid(), rand.Int())).
WaitOrDie(os.Stdout, os.Stderr)
deviceScript.Start("start").WaitOrDie(os.Stdout, os.Stderr)
@@ -201,7 +201,7 @@
binarydBin.Start(
"--name="+binarydName,
"--root_dir="+filepath.Join(workDir, "binstore"),
- "--veyron.tcp.address=127.0.0.1:0",
+ "--v23.tcp.address=127.0.0.1:0",
"--http=127.0.0.1:0")
sampleAppBinName := binarydName + "/testapp"
binaryBin.Run("upload", sampleAppBinName, binarydBin.Path())
@@ -214,12 +214,12 @@
applicationdBin.Start(
"--name="+appDName,
"--store="+mkSubdir(i, workDir, "appstore"),
- "--veyron.tcp.address=127.0.0.1:0",
+ "--v23.tcp.address=127.0.0.1:0",
)
sampleAppName := appDName + "/testapp/v0"
appPubName := "testbinaryd"
appEnvelopeFilename := filepath.Join(workDir, "app.envelope")
- appEnvelope := fmt.Sprintf("{\"Title\":\"BINARYD\", \"Args\":[\"--name=%s\", \"--root_dir=./binstore\", \"--veyron.tcp.address=127.0.0.1:0\", \"--http=127.0.0.1:0\"], \"Binary\":{\"File\":%q}, \"Env\":[]}", appPubName, sampleAppBinName)
+ appEnvelope := fmt.Sprintf("{\"Title\":\"BINARYD\", \"Args\":[\"--name=%s\", \"--root_dir=./binstore\", \"--v23.tcp.address=127.0.0.1:0\", \"--http=127.0.0.1:0\"], \"Binary\":{\"File\":%q}, \"Env\":[]}", appPubName, sampleAppBinName)
ioutil.WriteFile(appEnvelopeFilename, []byte(appEnvelope), 0666)
defer os.Remove(appEnvelopeFilename)
@@ -325,10 +325,6 @@
}
namespaceRoot, _ := i.GetVar(envvar.NamespacePrefix)
n = mtEP + "/global"
- // TODO(ashankar): The expected blessings of the namespace root should
- // also be from some VAR or something. For now, hardcoded, but this
- // should be fixed along with
- // https://github.com/veyron/release-issues/issues/98
if got, want := namespaceBin.Run("resolve", n), namespaceRoot; got != want {
i.Fatalf("got %q, want %q", got, want)
}
diff --git a/cmd/mgmt/shell_test.sh b/cmd/mgmt/shell_test.sh
index dcd853a..9a3be6b 100755
--- a/cmd/mgmt/shell_test.sh
+++ b/cmd/mgmt/shell_test.sh
@@ -168,9 +168,9 @@
# Start the mounttable daemon.
local -r MT_LOG=$(shell::tmp_file)
if [[ -n ${shell_test_RUNNING_UNDER_AGENT+1} ]]; then
- shell::run_server "${shell_test_DEFAULT_SERVER_TIMEOUT}" "${MT_LOG}" "${MT_LOG}" "${VRUN}" "${MOUNTTABLED_BIN}" --veyron.tcp.address="127.0.0.1:0" &> /dev/null || (cat "${MT_LOG}" && shell_test::fail "line ${LINENO}: failed to start mounttabled")
+ shell::run_server "${shell_test_DEFAULT_SERVER_TIMEOUT}" "${MT_LOG}" "${MT_LOG}" "${VRUN}" "${MOUNTTABLED_BIN}" --v23="127.0.0.1:0" &> /dev/null || (cat "${MT_LOG}" && shell_test::fail "line ${LINENO}: failed to start mounttabled")
else
- shell::run_server "${shell_test_DEFAULT_SERVER_TIMEOUT}" "${MT_LOG}" "${MT_LOG}" "${MOUNTTABLED_BIN}" --veyron.tcp.address="127.0.0.1:0" &> /dev/null || (cat "${MT_LOG}" && shell_test::fail "line ${LINENO}: failed to start mounttabled")
+ shell::run_server "${shell_test_DEFAULT_SERVER_TIMEOUT}" "${MT_LOG}" "${MT_LOG}" "${MOUNTTABLED_BIN}" --v23.tcp.address="127.0.0.1:0" &> /dev/null || (cat "${MT_LOG}" && shell_test::fail "line ${LINENO}: failed to start mounttabled")
fi
shell::timed_wait_for "${shell_test_DEFAULT_MESSAGE_TIMEOUT}" "${MT_LOG}" "Mount table service" || shell_test::fail "line ${LINENO}: failed to find expected output"
@@ -243,9 +243,9 @@
local -r PRINCIPAL_BIN="$(shell_test::build_go_binary 'v.io/x/ref/cmd/principal')"
local -r FORKCRED=$(shell::tmp_dir)
"${PRINCIPAL_BIN}" create --overwrite=true "${FORKCRED}" self >/dev/null || shell_test::fail "line ${LINENO}: create failed"
- "${PRINCIPAL_BIN}" --veyron.credentials="$1" bless --require_caveats=false "${FORKCRED}" "$2" >blessing || shell_test::fail "line ${LINENO}: bless failed"
- "${PRINCIPAL_BIN}" --veyron.credentials="${FORKCRED}" store setdefault blessing || shell_test::fail "line ${LINENO}: store setdefault failed"
- "${PRINCIPAL_BIN}" --veyron.credentials="${FORKCRED}" store set blessing ... || shell_test::fail "line ${LINENO}: store set failed"
+ "${PRINCIPAL_BIN}" --v23.credentials="$1" bless --require_caveats=false "${FORKCRED}" "$2" >blessing || shell_test::fail "line ${LINENO}: bless failed"
+ "${PRINCIPAL_BIN}" --v23.credentials="${FORKCRED}" store setdefault blessing || shell_test::fail "line ${LINENO}: store setdefault failed"
+ "${PRINCIPAL_BIN}" --v23.credentials="${FORKCRED}" store set blessing ... || shell_test::fail "line ${LINENO}: store set failed"
echo "${FORKCRED}"
}
diff --git a/cmd/mgmt/suid_test.sh b/cmd/mgmt/suid_test.sh
index b7111ee..93c27f0 100755
--- a/cmd/mgmt/suid_test.sh
+++ b/cmd/mgmt/suid_test.sh
@@ -143,7 +143,7 @@
echo ">> Installing and starting the device manager"
DM_INSTALL_DIR="${WORKDIR}/dm"
- export VANADIUM_DEVICE_DIR="${DM_INSTALL_DIR}"
+ export V23_DEVICE_DIR="${DM_INSTALL_DIR}"
if [[ "${WITH_SUID}" != "--with_suid" ]]; then
local -r extra_arg="--single_user"
@@ -156,7 +156,7 @@
${extra_arg} \
--origin="${DEVICED_APP_NAME}" \
-- \
- --veyron.tcp.address=127.0.0.1:0 \
+ --v23.tcp.address=127.0.0.1:0 \
--neighborhood_name="${NEIGHBORHOODNAME}"
"${VRUN}" "${DEVICE_SCRIPT}" start
@@ -220,7 +220,7 @@
# the device ("alice/myworkstation") can talk to it.
local -r BINARYD_NAME="binaryd"
shell_test::start_server "${VRUN}" --name=myworkstation/binaryd "${BINARYD_BIN}" --name="${BINARYD_NAME}" \
- --root_dir="${WORKDIR}/binstore" --veyron.tcp.address=127.0.0.1:0 --http=127.0.0.1:0 \
+ --root_dir="${WORKDIR}/binstore" --v23.tcp.address=127.0.0.1:0 --http=127.0.0.1:0 \
|| shell_test::fail "line ${LINENO} failed to start binaryd"
# Upload a binary to the binary server. The binary we upload is binaryd
@@ -237,14 +237,14 @@
# the device ("alice/myworkstation") can talk to it.
mkdir -p "${WORKDIR}/appstore"
shell_test::start_server "${VRUN}" --name=myworkstation/applicationd "${APPLICATIOND_BIN}" --name="${APPLICATIOND_NAME}" \
- --store="${WORKDIR}/appstore" --veyron.tcp.address=127.0.0.1:0 \
+ --store="${WORKDIR}/appstore" --v23.tcp.address=127.0.0.1:0 \
|| shell_test::fail "line ${LINENO} failed to start applicationd"
# Upload an envelope for our test app.
local -r SAMPLE_APP_NAME="${APPLICATIOND_NAME}/testapp/v0"
local -r APP_PUBLISH_NAME="testbinaryd"
echo ">> Uploading ${SAMPLE_APP_NAME}"
- echo "{\"Title\":\"BINARYD\", \"Args\":[\"--name=${APP_PUBLISH_NAME}\", \"--root_dir=./binstore\", \"--veyron.tcp.address=127.0.0.1:0\"], \"Binary\":{\"File\":\"${SAMPLE_APP_BIN_NAME}\"}, \"Env\":[]}" > ./app.envelope
+ echo "{\"Title\":\"BINARYD\", \"Args\":[\"--name=${APP_PUBLISH_NAME}\", \"--root_dir=./binstore\", \"--v23.tcp.address=127.0.0.1:0\"], \"Binary\":{\"File\":\"${SAMPLE_APP_BIN_NAME}\"}, \"Env\":[]}" > ./app.envelope
"${APPLICATION_BIN}" put "${SAMPLE_APP_NAME}" "${DEVICE_PROFILE}" ./app.envelope
rm ./app.envelope
@@ -339,8 +339,8 @@
wait_for_no_mountentry "${NAMESPACE_BIN}" "5" "${MT_NAME}"
"${DEVICE_SCRIPT}" uninstall
- if [[ -n "$(ls -A "${VANADIUM_DEVICE_DIR}" 2>/dev/null)" ]]; then
- shell_test::fail "${VANADIUM_DEVICE_DIR} is not empty"
+ if [[ -n "$(ls -A "${V23_DEVICE_DIR}" 2>/dev/null)" ]]; then
+ shell_test::fail "${V23_DEVICE_DIR} is not empty"
fi
shell_test::pass
}
diff --git a/cmd/mgmt/test.sh b/cmd/mgmt/test.sh
index 0feaf2a..5bca914 100755
--- a/cmd/mgmt/test.sh
+++ b/cmd/mgmt/test.sh
@@ -60,7 +60,7 @@
local -r PRINCIPAL_BIN="$(shell_test::build_go_binary 'v.io/x/ref/cmd/principal')"
- "${PRINCIPAL_BIN}" --veyron.credentials="${CRED}" dump >alice.dump || shell_test::fail "line ${LINENO}: ${PRINCIPAL_BIN} dump ${CRED} failed"
+ "${PRINCIPAL_BIN}" --v23.credentials="${CRED}" dump >alice.dump || shell_test::fail "line ${LINENO}: ${PRINCIPAL_BIN} dump ${CRED} failed"
cat alice.dump | rmpublickey >got || shell_test::fail "line ${LINENO}: cat alice.dump | rmpublickey failed"
cat >want <<EOF
Public key : XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX
@@ -83,7 +83,7 @@
local -r PRINCIPAL_BIN="$(shell_test::build_go_binary 'v.io/x/ref/cmd/principal')"
- "${PRINCIPAL_BIN}" --veyron.credentials="${FORKCRED}" dump >alice.dump || shell_test::fail "line ${LINENO}: ${PRINCIPAL_BIN} dump ${CRED} failed"
+ "${PRINCIPAL_BIN}" --v23.credentials="${FORKCRED}" dump >alice.dump || shell_test::fail "line ${LINENO}: ${PRINCIPAL_BIN} dump ${CRED} failed"
cat alice.dump | rmpublickey >got || shell_test::fail "line ${LINENO}: cat alice.dump | rmpublickey failed"
cat >want <<EOF
Public key : XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX
diff --git a/cmd/mounttable/doc.go b/cmd/mounttable/doc.go
index 550e923..64fc04b 100644
--- a/cmd/mounttable/doc.go
+++ b/cmd/mounttable/doc.go
@@ -34,6 +34,28 @@
logs at or above this threshold go to stderr
-v=0
log level for V logs
+ -v23.credentials=
+ directory to use for storing security credentials
+ -v23.i18n-catalogue=
+ 18n catalogue files to load, comma separated
+ -v23.namespace.root=[/ns.dev.v.io:8101]
+ local namespace root; can be repeated to provided multiple roots
+ -v23.proxy=
+ object name of proxy service to use to export services across network
+ boundaries
+ -v23.tcp.address=
+ address to listen on
+ -v23.tcp.protocol=wsh
+ protocol to listen with
+ -v23.vtrace.cache-size=1024
+ The number of vtrace traces to store in memory.
+ -v23.vtrace.collect-regexp=
+ Spans and annotations that match this regular expression will trigger trace
+ collection.
+ -v23.vtrace.dump-on-shutdown=true
+ If true, dump all stored traces on runtime shutdown.
+ -v23.vtrace.sample-rate=0
+ Rate (from 0.0 to 1.0) to sample vtrace traces.
-vanadium.i18n_catalogue=
18n catalogue files to load, comma separated
-veyron.credentials=
diff --git a/cmd/namespace/doc.go b/cmd/namespace/doc.go
index 011de6f..c87d044 100644
--- a/cmd/namespace/doc.go
+++ b/cmd/namespace/doc.go
@@ -8,9 +8,9 @@
/*
The namespace tool facilitates interaction with the Vanadium namespace.
-The namespace roots are set from the command line via veyron.namespace.root
-options or from environment variables that have a name starting with
-V23_NAMESPACE, e.g. V23_NAMESPACE, V23_NAMESPACE_2, V23_NAMESPACE_GOOGLE, etc.
+The namespace roots are set from the command line via --v23.namespace.root
+command line option or from environment variables that have a name starting with
+V23_NAMESPACE, e.g. V23_NAMESPACE, V23_NAMESPACE_2, V23_NAMESPACE_GOOGLE, etc.
The command line options override the environment.
Usage:
@@ -40,6 +40,28 @@
logs at or above this threshold go to stderr
-v=0
log level for V logs
+ -v23.credentials=
+ directory to use for storing security credentials
+ -v23.i18n-catalogue=
+ 18n catalogue files to load, comma separated
+ -v23.namespace.root=[/ns.dev.v.io:8101]
+ local namespace root; can be repeated to provided multiple roots
+ -v23.proxy=
+ object name of proxy service to use to export services across network
+ boundaries
+ -v23.tcp.address=
+ address to listen on
+ -v23.tcp.protocol=wsh
+ protocol to listen with
+ -v23.vtrace.cache-size=1024
+ The number of vtrace traces to store in memory.
+ -v23.vtrace.collect-regexp=
+ Spans and annotations that match this regular expression will trigger trace
+ collection.
+ -v23.vtrace.dump-on-shutdown=true
+ If true, dump all stored traces on runtime shutdown.
+ -v23.vtrace.sample-rate=0
+ Rate (from 0.0 to 1.0) to sample vtrace traces.
-vanadium.i18n_catalogue=
18n catalogue files to load, comma separated
-veyron.credentials=
diff --git a/cmd/namespace/impl.go b/cmd/namespace/impl.go
index 5e9ac2b..08483ca 100644
--- a/cmd/namespace/impl.go
+++ b/cmd/namespace/impl.go
@@ -213,9 +213,10 @@
Long: `
The namespace tool facilitates interaction with the Vanadium namespace.
-The namespace roots are set from the command line via veyron.namespace.root options or from environment variables that have a name
-starting with V23_NAMESPACE, e.g. V23_NAMESPACE, V23_NAMESPACE_2,
-V23_NAMESPACE_GOOGLE, etc. The command line options override the environment.
+The namespace roots are set from the command line via --v23.namespace.root
+command line option or from environment variables that have a name starting
+with V23_NAMESPACE, e.g. V23_NAMESPACE, V23_NAMESPACE_2, V23_NAMESPACE_GOOGLE,
+etc. The command line options override the environment.
`,
Children: []*cmdline.Command{cmdGlob, cmdMount, cmdUnmount, cmdResolve, cmdResolveToMT},
}
diff --git a/cmd/principal/doc.go b/cmd/principal/doc.go
index 8bdec5f..54099fd 100644
--- a/cmd/principal/doc.go
+++ b/cmd/principal/doc.go
@@ -47,6 +47,33 @@
logs at or above this threshold go to stderr
-v=0
log level for V logs
+ -v23.credentials=
+ directory to use for storing security credentials
+ -v23.i18n-catalogue=
+ 18n catalogue files to load, comma separated
+ -v23.namespace.root=[/ns.dev.v.io:8101]
+ local namespace root; can be repeated to provided multiple roots
+ -v23.permissions.file=map[]
+ specify an acl file as <name>:<aclfile>
+ -v23.permissions.literal=
+ explicitly specify the runtime acl as a JSON-encoded access.Permissions.
+ Overrides all --v23.permissions.file flags.
+ -v23.proxy=
+ object name of proxy service to use to export services across network
+ boundaries
+ -v23.tcp.address=
+ address to listen on
+ -v23.tcp.protocol=wsh
+ protocol to listen with
+ -v23.vtrace.cache-size=1024
+ The number of vtrace traces to store in memory.
+ -v23.vtrace.collect-regexp=
+ Spans and annotations that match this regular expression will trigger trace
+ collection.
+ -v23.vtrace.dump-on-shutdown=true
+ If true, dump all stored traces on runtime shutdown.
+ -v23.vtrace.sample-rate=0
+ Rate (from 0.0 to 1.0) to sample vtrace traces.
-vanadium.i18n_catalogue=
18n catalogue files to load, comma separated
-veyron.acl.file=map[]
@@ -180,8 +207,8 @@
Typically, this command should require no arguments. However, if the sender and
receiver are on different network domains, it may make sense to use the
---veyron.proxy flag:
- principal --veyron.proxy=proxy recvblessings
+--v23.proxy flag:
+ principal --v23.proxy=proxy recvblessings
The command to be run at the sender is of the form:
principal bless --remote_key=KEY --remote_token=TOKEN ADDRESS EXTENSION
@@ -419,13 +446,13 @@
For example, to make the principal in credentials directory A recognize the root
of the default blessing in credentials directory B:
- principal -veyron.credentials=B bless A some_extension |
- principal -veyron.credentials=A addtoroots -
+ principal -v23.credentials=B bless A some_extension |
+ principal -v23.credentials=A addtoroots -
The extension 'some_extension' has no effect in the command above.
Or to make the principal in credentials director A recognize the base64-encoded
public key KEY for blessing patterns P:
- principal -veyron.credentials=A addtoroots KEY P
+ principal -v23.credentials=A addtoroots KEY P
Usage:
principal addtoroots <key|blessing> [<blessing pattern>]
diff --git a/cmd/principal/main.go b/cmd/principal/main.go
index 05c6e2b..3e67cb7 100644
--- a/cmd/principal/main.go
+++ b/cmd/principal/main.go
@@ -376,13 +376,13 @@
For example, to make the principal in credentials directory A recognize the
root of the default blessing in credentials directory B:
- principal -veyron.credentials=B bless A some_extension |
- principal -veyron.credentials=A addtoroots -
+ principal -v23.credentials=B bless A some_extension |
+ principal -v23.credentials=A addtoroots -
The extension 'some_extension' has no effect in the command above.
Or to make the principal in credentials director A recognize the base64-encoded
public key KEY for blessing patterns P:
- principal -veyron.credentials=A addtoroots KEY P
+ principal -v23.credentials=A addtoroots KEY P
`,
ArgsName: "<key|blessing> [<blessing pattern>]",
ArgsLong: `
@@ -655,8 +655,8 @@
Typically, this command should require no arguments.
However, if the sender and receiver are on different network domains, it may
-make sense to use the --veyron.proxy flag:
- principal --veyron.proxy=proxy recvblessings
+make sense to use the --v23.proxy flag:
+ principal --v23.proxy=proxy recvblessings
The command to be run at the sender is of the form:
principal bless --remote_key=KEY --remote_token=TOKEN ADDRESS EXTENSION
diff --git a/cmd/principal/principal_v23_test.go b/cmd/principal/principal_v23_test.go
index 0f27924..c5381b8 100644
--- a/cmd/principal/principal_v23_test.go
+++ b/cmd/principal/principal_v23_test.go
@@ -84,8 +84,8 @@
redirect(t, bin.WithEnv(blessEnv).Start("bless", "--for=1m", bobDir, "friend"), aliceFriend)
// Run store forpeer on bob.
- bin.Start("--veyron.credentials="+bobDir, "set", "forpeer", aliceFriend, "alice").WaitOrDie(os.Stdout, os.Stderr)
- redirect(t, bin.WithEnv(blessEnv).Start("--veyron.credentials="+bobDir, "get", "forpeer", "alice/server"), bobForPeer)
+ bin.Start("--v23.credentials="+bobDir, "set", "forpeer", aliceFriend, "alice").WaitOrDie(os.Stdout, os.Stderr)
+ redirect(t, bin.WithEnv(blessEnv).Start("--v23.credentials="+bobDir, "get", "forpeer", "alice/server"), bobForPeer)
got := removeCaveats(removePublicKeys(bin.Start("dumpblessings", bobForPeer).Output()))
want := `Blessings : bob#alice/friend
@@ -164,7 +164,7 @@
// (blessings received must be set as default and shareable with all peers).
var args []string
{
- inv := bin.Start("--veyron.credentials="+carolDir, "--veyron.tcp.address=127.0.0.1:0", "recvblessings")
+ inv := bin.Start("--v23.credentials="+carolDir, "--v23.tcp.address=127.0.0.1:0", "recvblessings")
args = append([]string{"bless", "--require_caveats=false"}, blessArgsFromRecvBlessings(inv)...)
// Replace the random extension suggested by recvblessings with "friend/carol"
args[len(args)-1] = "friend/carol"
@@ -174,7 +174,7 @@
// Run recvblessings on carol, and have alice send blessings over
// (blessings received must be set as shareable with peers matching 'alice/...'.)
{
- inv := bin.Start("--veyron.credentials="+carolDir, "--veyron.tcp.address=127.0.0.1:0", "recvblessings", "--for_peer=alice", "--set_default=false")
+ inv := bin.Start("--v23.credentials="+carolDir, "--v23.tcp.address=127.0.0.1:0", "recvblessings", "--for_peer=alice", "--set_default=false")
// recvblessings suggests a random extension, find the extension and replace it with friend/carol/foralice.
args = append([]string{"bless", "--require_caveats=false"}, blessArgsFromRecvBlessings(inv)...)
args[len(args)-1] = "friend/carol/foralice"
@@ -183,14 +183,14 @@
// Run recvblessings on carol with the --remote_arg_file flag, and have bob send blessings over with the --remote_arg_file flag.
{
- inv := bin.Start("--veyron.credentials="+carolDir, "--veyron.tcp.address=127.0.0.1:0", "recvblessings", "--for_peer=bob", "--set_default=false", "--remote_arg_file="+bobBlessFile)
+ inv := bin.Start("--v23.credentials="+carolDir, "--v23.tcp.address=127.0.0.1:0", "recvblessings", "--for_peer=bob", "--set_default=false", "--remote_arg_file="+bobBlessFile)
// recvblessings suggests a random extension, use friend/carol/forbob instead.
args = append([]string{"bless", "--require_caveats=false"}, blessArgsFromRecvBlessings(inv)...)
args[len(args)-1] = "friend/carol/forbob"
}
bin.WithEnv(credEnv(bobDir)).Start(args...).WaitOrDie(os.Stdout, os.Stderr)
- listenerInv := bin.Start("--veyron.credentials="+carolDir, "--veyron.tcp.address=127.0.0.1:0", "recvblessings", "--for_peer=alice/...", "--set_default=false", "--vmodule=*=2", "--logtostderr")
+ listenerInv := bin.Start("--v23.credentials="+carolDir, "--v23.tcp.address=127.0.0.1:0", "recvblessings", "--for_peer=alice/...", "--set_default=false", "--vmodule=*=2", "--logtostderr")
args = append([]string{"bless", "--require_caveats=false"}, blessArgsFromRecvBlessings(listenerInv)...)
@@ -220,8 +220,9 @@
}
}
- // Dump carol out, all three blessings should be in the store.
- got := removePublicKeys(bin.Start("--veyron.credentials="+carolDir, "dump").Output())
+ // Dump carol out, the only blessing that survives should be from the
+ // first "bless" command. (alice/friend/carol).
+ got := removePublicKeys(bin.Start("--v23.credentials="+carolDir, "dump").Output())
want := `Public key : XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX
---------------- BlessingStore ----------------
Default blessings: alice/friend/carol
@@ -255,11 +256,11 @@
// Run fork to setup up credentials for alice/phone that are
// blessed by alice under the extension "phone".
- bin.Start("--veyron.credentials="+aliceDir, "fork", "--for", "1h", alicePhoneDir, "phone").WaitOrDie(os.Stdout, os.Stderr)
+ bin.Start("--v23.credentials="+aliceDir, "fork", "--for", "1h", alicePhoneDir, "phone").WaitOrDie(os.Stdout, os.Stderr)
// Dump alice-phone out, the only blessings it has must be from alice (alice/phone).
{
- got := removePublicKeys(bin.Start("--veyron.credentials="+alicePhoneDir, "dump").Output())
+ got := removePublicKeys(bin.Start("--v23.credentials="+alicePhoneDir, "dump").Output())
want := `Public key : XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX
---------------- BlessingStore ----------------
Default blessings: alice/phone
@@ -275,7 +276,7 @@
}
// And it should have an expiry caveat
{
- redirect(t, bin.Start("--veyron.credentials", alicePhoneDir, "get", "default"), tmpfile)
+ redirect(t, bin.Start("--v23.credentials", alicePhoneDir, "get", "default"), tmpfile)
got := removeCaveats(removePublicKeys(bin.Start("dumpblessings", tmpfile).Output()))
want := `Blessings : alice/phone
PublicKey : XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX
@@ -292,9 +293,9 @@
// Run fork to setup up credentials for alice/phone/calendar that are
// blessed by alice/phone under the extension "calendar".
- bin.Start("--veyron.credentials="+alicePhoneDir, "fork", "--for", "1h", alicePhoneCalendarDir, "calendar").WaitOrDie(os.Stdout, os.Stderr)
+ bin.Start("--v23.credentials="+alicePhoneDir, "fork", "--for", "1h", alicePhoneCalendarDir, "calendar").WaitOrDie(os.Stdout, os.Stderr)
{
- got := removePublicKeys(bin.Start("--veyron.credentials="+alicePhoneCalendarDir, "dump").Output())
+ got := removePublicKeys(bin.Start("--v23.credentials="+alicePhoneCalendarDir, "dump").Output())
want := `Public key : XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX
---------------- BlessingStore ----------------
Default blessings: alice/phone/calendar
@@ -309,7 +310,7 @@
}
}
{
- redirect(t, bin.Start("--veyron.credentials", alicePhoneCalendarDir, "get", "default"), tmpfile)
+ redirect(t, bin.Start("--v23.credentials", alicePhoneCalendarDir, "get", "default"), tmpfile)
got := removeCaveats(removePublicKeys(bin.Start("dumpblessings", tmpfile).Output()))
want := `Blessings : alice/phone/calendar
PublicKey : XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX
@@ -386,7 +387,7 @@
if err := bin.Start("create", parent, "parent").Wait(os.Stdout, os.Stderr); err != nil {
t.Fatalf("create %q failed: %v", parent, err)
}
- if err := bin.Start("--veyron.credentials="+parent, "fork", "--for=1s", t.NewTempDir(), "child").Wait(os.Stdout, os.Stderr); err != nil {
+ if err := bin.Start("--v23.credentials="+parent, "fork", "--for=1s", t.NewTempDir(), "child").Wait(os.Stdout, os.Stderr); err != nil {
t.Errorf("fork failed: %v", err)
}
}
@@ -401,17 +402,17 @@
if err := bin.Start("create", parent, "parent").Wait(os.Stdout, os.Stderr); err != nil {
t.Fatalf("create %q failed: %v", parent, err)
}
- if err := bin.Start("--veyron.credentials", parent, "fork", child, "child").Wait(os.Stdout, &buf); err == nil {
+ if err := bin.Start("--v23.credentials", parent, "fork", child, "child").Wait(os.Stdout, &buf); err == nil {
t.Errorf("fork should have failed without any caveats, but did not")
} else if got, want := buf.String(), "ERROR: no caveats provided"; !strings.Contains(got, want) {
t.Errorf("fork returned error: %q, expected error to contain %q", got, want)
}
- if err := bin.Start("--veyron.credentials", parent, "fork", "--for=0", child, "child").Wait(os.Stdout, &buf); err == nil {
+ if err := bin.Start("--v23.credentials", parent, "fork", "--for=0", child, "child").Wait(os.Stdout, &buf); err == nil {
t.Errorf("fork should have failed without any caveats, but did not")
} else if got, want := buf.String(), "ERROR: no caveats provided"; !strings.Contains(got, want) {
t.Errorf("fork returned error: %q, expected error to contain %q", got, want)
}
- if err := bin.Start("--veyron.credentials", parent, "fork", "--require_caveats=false", child, "child").Wait(os.Stdout, os.Stderr); err != nil {
+ if err := bin.Start("--v23.credentials", parent, "fork", "--require_caveats=false", child, "child").Wait(os.Stdout, os.Stderr); err != nil {
t.Errorf("fork --require_caveats=false failed with: %v", err)
}
}
@@ -494,7 +495,7 @@
// "principal dump", which is formatted as:
// Public key : <the public key>
publicKey = func(dir string) string {
- output := bin.Start("--veyron.credentials="+dir, "dump").Output()
+ output := bin.Start("--v23.credentials="+dir, "dump").Output()
line := strings.SplitN(output, "\n", 2)[0]
fields := strings.Split(line, " ")
return fields[len(fields)-1]
@@ -504,8 +505,8 @@
bin.Start("create", aliceDir, "alice").WaitOrDie(os.Stdout, os.Stderr)
bin.Start("create", bobDir, "bob").WaitOrDie(os.Stdout, os.Stderr)
// Have bob create a "bob/friend" blessing and have alice recognize that.
- redirect(t, bin.Start("--veyron.credentials="+bobDir, "bless", "--require_caveats=false", aliceDir, "friend"), blessingFile)
- bin.Start("--veyron.credentials="+aliceDir, "addtoroots", blessingFile).WaitOrDie(os.Stdout, os.Stderr)
+ redirect(t, bin.Start("--v23.credentials="+bobDir, "bless", "--require_caveats=false", aliceDir, "friend"), blessingFile)
+ bin.Start("--v23.credentials="+aliceDir, "addtoroots", blessingFile).WaitOrDie(os.Stdout, os.Stderr)
var (
// blessing roots lines that should match the keys
aliceLine = fmt.Sprintf("%v : [alice]", publicKey(aliceDir))
@@ -514,7 +515,7 @@
foundAlice, foundBob bool
)
// Finally dump alice's principal, it should have lines corresponding to aliceLine and bobLine.
- output := bin.Start("--veyron.credentials="+aliceDir, "dump").Output()
+ output := bin.Start("--v23.credentials="+aliceDir, "dump").Output()
for _, line := range strings.Split(output, "\n") {
if line == aliceLine {
foundAlice = true
@@ -541,9 +542,9 @@
// der, _ := key.MarshalBinary()
// b64 := base64.URLEncoding.EncodeToString(der) // argument to addtoroots
// str := fmt.Sprintf("%v", key) // for the "want" line
- bin.Start("--veyron.credentials="+aliceDir, "addtoroots", "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9iRjaFDoGJI9tarUwWqIW31ti72krThkYByn1v9Lf89D9VA0Mg2oUL7FDDM7qxjZcVM1ktM_W4tBfMVuRZmVCA==", "some_other_provider").WaitOrDie(os.Stdout, os.Stderr)
+ bin.Start("--v23.credentials="+aliceDir, "addtoroots", "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE9iRjaFDoGJI9tarUwWqIW31ti72krThkYByn1v9Lf89D9VA0Mg2oUL7FDDM7qxjZcVM1ktM_W4tBfMVuRZmVCA==", "some_other_provider").WaitOrDie(os.Stdout, os.Stderr)
// "foo" should appear in the set of BlessingRoots
- output := bin.Start("--veyron.credentials="+aliceDir, "dump").Output()
+ output := bin.Start("--v23.credentials="+aliceDir, "dump").Output()
want := fmt.Sprintf("41:26:f6:aa:54:f9:31:d4:9d:1f:d2:69:c6:c5:50:70 : [some_other_provider]")
for _, line := range strings.Split(output, "\n") {
if line == want {
diff --git a/cmd/profile/doc.go b/cmd/profile/doc.go
index e854d2b..85d1ed1 100644
--- a/cmd/profile/doc.go
+++ b/cmd/profile/doc.go
@@ -35,6 +35,28 @@
logs at or above this threshold go to stderr
-v=0
log level for V logs
+ -v23.credentials=
+ directory to use for storing security credentials
+ -v23.i18n-catalogue=
+ 18n catalogue files to load, comma separated
+ -v23.namespace.root=[/ns.dev.v.io:8101]
+ local namespace root; can be repeated to provided multiple roots
+ -v23.proxy=
+ object name of proxy service to use to export services across network
+ boundaries
+ -v23.tcp.address=
+ address to listen on
+ -v23.tcp.protocol=wsh
+ protocol to listen with
+ -v23.vtrace.cache-size=1024
+ The number of vtrace traces to store in memory.
+ -v23.vtrace.collect-regexp=
+ Spans and annotations that match this regular expression will trigger trace
+ collection.
+ -v23.vtrace.dump-on-shutdown=true
+ If true, dump all stored traces on runtime shutdown.
+ -v23.vtrace.sample-rate=0
+ Rate (from 0.0 to 1.0) to sample vtrace traces.
-vanadium.i18n_catalogue=
18n catalogue files to load, comma separated
-veyron.credentials=
diff --git a/cmd/servicerunner/main.go b/cmd/servicerunner/main.go
index 1f186d4..a04cc1c 100644
--- a/cmd/servicerunner/main.go
+++ b/cmd/servicerunner/main.go
@@ -111,7 +111,7 @@
}
defer sh.Cleanup(os.Stderr, os.Stderr)
- h, err := sh.Start("rootMT", nil, "--veyron.tcp.protocol=ws", "--veyron.tcp.address=127.0.0.1:0")
+ h, err := sh.Start("rootMT", nil, "--v23.tcp.protocol=ws", "--v23.tcp.address=127.0.0.1:0")
panicOnError(err)
panicOnError(updateVars(h, vars, "MT_NAME"))
@@ -123,11 +123,11 @@
defer proxyShutdown()
vars["PROXY_NAME"] = proxyEndpoint.Name()
- h, err = sh.Start(WSPRCommand, nil, "--veyron.tcp.protocol=ws", "--veyron.tcp.address=127.0.0.1:0", "--veyron.proxy=test/proxy", "--identd=test/identd")
+ h, err = sh.Start(WSPRCommand, nil, "--v23.tcp.protocol=ws", "--v23.tcp.address=127.0.0.1:0", "--v23.proxy=test/proxy", "--identd=test/identd")
panicOnError(err)
panicOnError(updateVars(h, vars, "WSPR_ADDR"))
- h, err = sh.Start(identityd.TestIdentitydCommand, nil, "--veyron.tcp.protocol=ws", "--veyron.tcp.address=127.0.0.1:0", "--veyron.proxy=test/proxy", "--httpaddr=localhost:0")
+ h, err = sh.Start(identityd.TestIdentitydCommand, nil, "--v23.tcp.protocol=ws", "--v23.tcp.address=127.0.0.1:0", "--v23.proxy=test/proxy", "--httpaddr=localhost:0")
panicOnError(err)
panicOnError(updateVars(h, vars, "TEST_IDENTITYD_NAME", "TEST_IDENTITYD_HTTP_ADDR"))
diff --git a/cmd/uniqueid/doc.go b/cmd/uniqueid/doc.go
index 67b7de5..6c4c7a5 100644
--- a/cmd/uniqueid/doc.go
+++ b/cmd/uniqueid/doc.go
@@ -33,6 +33,33 @@
logs at or above this threshold go to stderr
-v=0
log level for V logs
+ -v23.credentials=
+ directory to use for storing security credentials
+ -v23.i18n-catalogue=
+ 18n catalogue files to load, comma separated
+ -v23.namespace.root=[/ns.dev.v.io:8101]
+ local namespace root; can be repeated to provided multiple roots
+ -v23.permissions.file=map[]
+ specify an acl file as <name>:<aclfile>
+ -v23.permissions.literal=
+ explicitly specify the runtime acl as a JSON-encoded access.Permissions.
+ Overrides all --v23.permissions.file flags.
+ -v23.proxy=
+ object name of proxy service to use to export services across network
+ boundaries
+ -v23.tcp.address=
+ address to listen on
+ -v23.tcp.protocol=wsh
+ protocol to listen with
+ -v23.vtrace.cache-size=1024
+ The number of vtrace traces to store in memory.
+ -v23.vtrace.collect-regexp=
+ Spans and annotations that match this regular expression will trigger trace
+ collection.
+ -v23.vtrace.dump-on-shutdown=true
+ If true, dump all stored traces on runtime shutdown.
+ -v23.vtrace.sample-rate=0
+ Rate (from 0.0 to 1.0) to sample vtrace traces.
-vanadium.i18n_catalogue=
18n catalogue files to load, comma separated
-veyron.acl.file=map[]
diff --git a/cmd/vdl/doc.go b/cmd/vdl/doc.go
index 0e06c1f..a22d79b 100644
--- a/cmd/vdl/doc.go
+++ b/cmd/vdl/doc.go
@@ -54,6 +54,33 @@
logs at or above this threshold go to stderr
-v=0
log level for V logs
+ -v23.credentials=
+ directory to use for storing security credentials
+ -v23.i18n-catalogue=
+ 18n catalogue files to load, comma separated
+ -v23.namespace.root=[/ns.dev.v.io:8101]
+ local namespace root; can be repeated to provided multiple roots
+ -v23.permissions.file=map[]
+ specify an acl file as <name>:<aclfile>
+ -v23.permissions.literal=
+ explicitly specify the runtime acl as a JSON-encoded access.Permissions.
+ Overrides all --v23.permissions.file flags.
+ -v23.proxy=
+ object name of proxy service to use to export services across network
+ boundaries
+ -v23.tcp.address=
+ address to listen on
+ -v23.tcp.protocol=wsh
+ protocol to listen with
+ -v23.vtrace.cache-size=1024
+ The number of vtrace traces to store in memory.
+ -v23.vtrace.collect-regexp=
+ Spans and annotations that match this regular expression will trigger trace
+ collection.
+ -v23.vtrace.dump-on-shutdown=true
+ If true, dump all stored traces on runtime shutdown.
+ -v23.vtrace.sample-rate=0
+ Rate (from 0.0 to 1.0) to sample vtrace traces.
-vanadium.i18n_catalogue=
18n catalogue files to load, comma separated
-veyron.acl.file=map[]
diff --git a/cmd/vom/doc.go b/cmd/vom/doc.go
index 4fc7d25..bcc38a3 100644
--- a/cmd/vom/doc.go
+++ b/cmd/vom/doc.go
@@ -32,6 +32,33 @@
logs at or above this threshold go to stderr
-v=0
log level for V logs
+ -v23.credentials=
+ directory to use for storing security credentials
+ -v23.i18n-catalogue=
+ 18n catalogue files to load, comma separated
+ -v23.namespace.root=[/ns.dev.v.io:8101]
+ local namespace root; can be repeated to provided multiple roots
+ -v23.permissions.file=map[]
+ specify an acl file as <name>:<aclfile>
+ -v23.permissions.literal=
+ explicitly specify the runtime acl as a JSON-encoded access.Permissions.
+ Overrides all --v23.permissions.file flags.
+ -v23.proxy=
+ object name of proxy service to use to export services across network
+ boundaries
+ -v23.tcp.address=
+ address to listen on
+ -v23.tcp.protocol=wsh
+ protocol to listen with
+ -v23.vtrace.cache-size=1024
+ The number of vtrace traces to store in memory.
+ -v23.vtrace.collect-regexp=
+ Spans and annotations that match this regular expression will trigger trace
+ collection.
+ -v23.vtrace.dump-on-shutdown=true
+ If true, dump all stored traces on runtime shutdown.
+ -v23.vtrace.sample-rate=0
+ Rate (from 0.0 to 1.0) to sample vtrace traces.
-vanadium.i18n_catalogue=
18n catalogue files to load, comma separated
-veyron.acl.file=map[]
diff --git a/cmd/vomtestgen/doc.go b/cmd/vomtestgen/doc.go
index e21085b..f8514f4 100644
--- a/cmd/vomtestgen/doc.go
+++ b/cmd/vomtestgen/doc.go
@@ -46,6 +46,33 @@
logs at or above this threshold go to stderr
-v=0
log level for V logs
+ -v23.credentials=
+ directory to use for storing security credentials
+ -v23.i18n-catalogue=
+ 18n catalogue files to load, comma separated
+ -v23.namespace.root=[/ns.dev.v.io:8101]
+ local namespace root; can be repeated to provided multiple roots
+ -v23.permissions.file=map[]
+ specify an acl file as <name>:<aclfile>
+ -v23.permissions.literal=
+ explicitly specify the runtime acl as a JSON-encoded access.Permissions.
+ Overrides all --v23.permissions.file flags.
+ -v23.proxy=
+ object name of proxy service to use to export services across network
+ boundaries
+ -v23.tcp.address=
+ address to listen on
+ -v23.tcp.protocol=wsh
+ protocol to listen with
+ -v23.vtrace.cache-size=1024
+ The number of vtrace traces to store in memory.
+ -v23.vtrace.collect-regexp=
+ Spans and annotations that match this regular expression will trigger trace
+ collection.
+ -v23.vtrace.dump-on-shutdown=true
+ If true, dump all stored traces on runtime shutdown.
+ -v23.vtrace.sample-rate=0
+ Rate (from 0.0 to 1.0) to sample vtrace traces.
-vanadium.i18n_catalogue=
18n catalogue files to load, comma separated
-veyron.acl.file=map[]
diff --git a/cmd/vrpc/doc.go b/cmd/vrpc/doc.go
index a6ae4eb..fe7da61 100644
--- a/cmd/vrpc/doc.go
+++ b/cmd/vrpc/doc.go
@@ -34,6 +34,28 @@
logs at or above this threshold go to stderr
-v=0
log level for V logs
+ -v23.credentials=
+ directory to use for storing security credentials
+ -v23.i18n-catalogue=
+ 18n catalogue files to load, comma separated
+ -v23.namespace.root=[/ns.dev.v.io:8101]
+ local namespace root; can be repeated to provided multiple roots
+ -v23.proxy=
+ object name of proxy service to use to export services across network
+ boundaries
+ -v23.tcp.address=
+ address to listen on
+ -v23.tcp.protocol=wsh
+ protocol to listen with
+ -v23.vtrace.cache-size=1024
+ The number of vtrace traces to store in memory.
+ -v23.vtrace.collect-regexp=
+ Spans and annotations that match this regular expression will trigger trace
+ collection.
+ -v23.vtrace.dump-on-shutdown=true
+ If true, dump all stored traces on runtime shutdown.
+ -v23.vtrace.sample-rate=0
+ Rate (from 0.0 to 1.0) to sample vtrace traces.
-vanadium.i18n_catalogue=
18n catalogue files to load, comma separated
-veyron.credentials=
@@ -68,13 +90,18 @@
If a [method] is provided, returns the signature of just that method.
Usage:
- vrpc signature <server> [method]
+ vrpc signature [flags] <server> [method]
<server> identifies a Vanadium server. It can either be the object address of
the server, or an object name that will be resolved to an end-point.
[method] is the optional server method name.
+The vrpc signature flags are:
+ -insecure=false
+ If true, skip server authentication. This means that the client will reveal
+ its blessings to servers that it may not recognize.
+
Vrpc Call
Call connects to the Vanadium server identified by <server> and calls the
@@ -112,11 +139,16 @@
considered valid by the principal running this tool) to standard output.
Usage:
- vrpc identify <server>
+ vrpc identify [flags] <server>
<server> identifies a Vanadium server. It can either be the object address of
the server, or an object name that will be resolved to an end-point.
+The vrpc identify flags are:
+ -insecure=false
+ If true, skip server authentication. This means that the client will reveal
+ its blessings to servers that it may not recognize.
+
Vrpc Help
Help with no args displays the usage of the parent command.
diff --git a/cmd/vrpc/vrpc.go b/cmd/vrpc/vrpc.go
index 9dba47c..3a1e2af 100644
--- a/cmd/vrpc/vrpc.go
+++ b/cmd/vrpc/vrpc.go
@@ -17,6 +17,7 @@
"v.io/v23"
"v.io/v23/context"
"v.io/v23/options"
+ "v.io/v23/rpc"
"v.io/v23/rpc/reserved"
"v.io/v23/vdl"
"v.io/v23/vdlroot/signature"
@@ -28,7 +29,10 @@
_ "v.io/x/ref/profiles"
)
-var gctx *context.T
+var (
+ gctx *context.T
+ flagInsecure bool
+)
func main() {
var shutdown v23.Shutdown
@@ -38,6 +42,16 @@
os.Exit(exitCode)
}
+func init() {
+ const (
+ insecureVal = false
+ insecureName = "insecure"
+ insecureDesc = "If true, skip server authentication. This means that the client will reveal its blessings to servers that it may not recognize."
+ )
+ cmdSignature.Flags.BoolVar(&flagInsecure, insecureName, insecureVal, insecureDesc)
+ cmdIdentify.Flags.BoolVar(&flagInsecure, insecureName, insecureVal, insecureDesc)
+}
+
var cmdVRPC = &cmdline.Command{
Name: "vrpc",
Short: "Vanadium Remote Procedure Call tool",
@@ -133,11 +147,12 @@
ctx, cancel := context.WithTimeout(gctx, time.Minute)
defer cancel()
var types vdlgen.NamedTypes
+ var opts []rpc.CallOpt
+ if flagInsecure {
+ opts = append(opts, options.SkipServerEndpointAuthorization{})
+ }
if method != "" {
- // TODO(ashankar): Should not skip authorization, but instead
- // authorize by default and provide a --insecure flag to skip
- // it?
- methodSig, err := reserved.MethodSignature(ctx, server, method, options.SkipServerEndpointAuthorization{})
+ methodSig, err := reserved.MethodSignature(ctx, server, method, opts...)
if err != nil {
return fmt.Errorf("MethodSignature failed: %v", err)
}
@@ -146,9 +161,7 @@
types.Print(cmd.Stdout())
return nil
}
- // TODO(ashankar): Should not skip authorization, but instead authorize
- // by default and provide a --insecure flag to skip it?
- ifacesSig, err := reserved.Signature(ctx, server, options.SkipServerEndpointAuthorization{})
+ ifacesSig, err := reserved.Signature(ctx, server, opts...)
if err != nil {
return fmt.Errorf("Signature failed: %v", err)
}
@@ -262,13 +275,17 @@
server := args[0]
ctx, cancel := context.WithTimeout(gctx, time.Minute)
defer cancel()
+ var opts []rpc.CallOpt
+ if flagInsecure {
+ opts = append(opts, options.SkipServerEndpointAuthorization{})
+ }
// The method name does not matter - only interested in authentication,
// not in actually making an RPC.
- call, err := v23.GetClient(ctx).StartCall(ctx, server, "", nil)
+ call, err := v23.GetClient(ctx).StartCall(ctx, server, "", nil, opts...)
if err != nil {
return fmt.Errorf(`client.StartCall(%q, "", nil) failed with %v`, server, err)
}
valid, presented := call.RemoteBlessings()
- fmt.Fprintf(cmd.Stdout(), "PRESENTED: %v\nVALID: %v\n", presented, valid)
+ fmt.Fprintf(cmd.Stdout(), "PRESENTED: %v\nVALID: %v\nPUBLICKEY: %v\n", presented, valid, presented.PublicKey())
return nil
}
diff --git a/examples/rps/rpsbot/impl_test.go b/examples/rps/rpsbot/impl_test.go
index e84d749..420e0f2 100644
--- a/examples/rps/rpsbot/impl_test.go
+++ b/examples/rps/rpsbot/impl_test.go
@@ -96,7 +96,7 @@
t.Fatalf("Could not create shell: %v", err)
}
defer sh.Cleanup(os.Stdout, os.Stderr)
- h, err := sh.Start("rootMT", nil, "--veyron.tcp.address=127.0.0.1:0")
+ h, err := sh.Start("rootMT", nil, "--v23.tcp.address=127.0.0.1:0")
if err != nil {
if h != nil {
h.Shutdown(nil, os.Stderr)
diff --git a/examples/tunnel/tunneld/tunneld_v23_test.go b/examples/tunnel/tunneld/tunneld_v23_test.go
index 259ef7b..62ee886 100644
--- a/examples/tunnel/tunneld/tunneld_v23_test.go
+++ b/examples/tunnel/tunneld/tunneld_v23_test.go
@@ -18,14 +18,14 @@
)
func V23TestTunneld(t *v23tests.T) {
- v23tests.RunRootMT(t, "--veyron.tcp.address=127.0.0.1:0")
+ v23tests.RunRootMT(t, "--v23.tcp.address=127.0.0.1:0")
tunneldBin := t.BuildV23Pkg("v.io/x/ref/examples/tunnel/tunneld")
vsh := t.BuildV23Pkg("v.io/x/ref/examples/tunnel/vsh")
mounttableBin := t.BuildV23Pkg("v.io/x/ref/cmd/mounttable")
// Start tunneld with a known endpoint.
- tunnelEndpoint := tunneldBin.Start("--veyron.tcp.address=127.0.0.1:0").ExpectVar("NAME")
+ tunnelEndpoint := tunneldBin.Start("--v23.tcp.address=127.0.0.1:0").ExpectVar("NAME")
// Run remote command with the endpoint.
if want, got := "HELLO ENDPOINT\n", vsh.Start(tunnelEndpoint, "echo", "HELLO", "ENDPOINT").Output(); want != got {
diff --git a/lib/exec/consts/consts.go b/lib/exec/consts/consts.go
index 254f97c..d6a1f1d 100644
--- a/lib/exec/consts/consts.go
+++ b/lib/exec/consts/consts.go
@@ -13,4 +13,4 @@
// or ensure that it doesn't appear in a set of environment variables;
// exposing the name of this variable is intended to support such
// situations.
-const ExecVersionVariable = "VEYRON_EXEC_VERSION"
+const ExecVersionVariable = "V23_EXEC_VERSION"
diff --git a/lib/flags/flags.go b/lib/flags/flags.go
index bb4d1f9..f28d1dd 100644
--- a/lib/flags/flags.go
+++ b/lib/flags/flags.go
@@ -28,24 +28,26 @@
const (
// Runtime identifies the flags and associated environment variables
// used by the Vanadium process runtime. Namely:
- // --veyron.namespace.root (which may be repeated to supply multiple values)
- // --veyron.credentials
- // --veyron.vtrace.sample_rate
- // --veyron.vtrace.dump_on_shutdown
- // --veyron.vtrace.cache_size
- // --veyron.vtrace.collect_regexp
+ // --v23.namespace.root (which may be repeated to supply multiple values)
+ // --v23.credentials
+ // --v23.vtrace.sample-rate
+ // --v23.vtrace.dump-on-shutdown
+ // --v23.vtrace.cache-size
+ // --v23.vtrace.collect-regexp
Runtime FlagGroup = iota
// Listen identifies the flags typically required to configure
// rpc.ListenSpec. Namely:
- // --veyron.tcp.protocol
- // --veyron.tcp.address
- // --veyron.proxy
- // --vanadium.i18n_catalogue
+ // --v23.tcp.protocol
+ // --v23.tcp.address
+ // --v23.proxy
+ // --v23.i18n-catalogue
Listen
- // --veyron.acl.file (which may be repeated to supply multiple values)
- // AccessList files are named - i.e. --veyron.acl=<name>:<file> with the
- // name <runtime> reserved for use by the runtime.
- // --veyron.acl.literal
+ // --v23.permissions.file (which may be repeated to supply multiple values)
+ // Permissions files are named - i.e. --v23.permissions.file=<name>:<file>
+ // with the name "runtime" reserved for use by the runtime. "file" is
+ // a JSON-encoded representation of the Permissions type defined in the
+ // VDL package v.io/v23/security/access
+ // -v23.permissions.literal
AccessList
)
@@ -121,7 +123,7 @@
// RuntimeFlags contains the values of the Runtime flag group.
type RuntimeFlags struct {
// NamespaceRoots may be initialized by envvar.NamespacePrefix* enivornment
- // variables as well as --veyron.namespace.root. The command line
+ // variables as well as --v23.namespace.root. The command line
// will override the environment.
NamespaceRoots []string
@@ -272,6 +274,17 @@
f.namespaceRootsFlag.roots = roots
}
+ fs.Var(&f.namespaceRootsFlag, "v23.namespace.root", "local namespace root; can be repeated to provided multiple roots")
+ fs.StringVar(&f.Credentials, "v23.credentials", creds, "directory to use for storing security credentials")
+ fs.StringVar(&f.I18nCatalogue, "v23.i18n-catalogue", i18nCatalogue, "18n catalogue files to load, comma separated")
+
+ fs.Float64Var(&f.Vtrace.SampleRate, "v23.vtrace.sample-rate", 0.0, "Rate (from 0.0 to 1.0) to sample vtrace traces.")
+ fs.BoolVar(&f.Vtrace.DumpOnShutdown, "v23.vtrace.dump-on-shutdown", true, "If true, dump all stored traces on runtime shutdown.")
+ fs.IntVar(&f.Vtrace.CacheSize, "v23.vtrace.cache-size", 1024, "The number of vtrace traces to store in memory.")
+ fs.StringVar(&f.Vtrace.CollectRegexp, "v23.vtrace.collect-regexp", "", "Spans and annotations that match this regular expression will trigger trace collection.")
+
+ // TODO(ashankar): Older names: To be removed:
+ // See: https://github.com/veyron/release-issues/issues/1421
fs.Var(&f.namespaceRootsFlag, "veyron.namespace.root", "local namespace root; can be repeated to provided multiple roots")
fs.StringVar(&f.Credentials, "veyron.credentials", creds, "directory to use for storing security credentials")
fs.StringVar(&f.I18nCatalogue, "vanadium.i18n_catalogue", i18nCatalogue, "18n catalogue files to load, comma separated")
@@ -286,12 +299,16 @@
func createAndRegisterAccessListFlags(fs *flag.FlagSet) *AccessListFlags {
f := &AccessListFlags{}
+ fs.Var(&f.fileFlag, "v23.permissions.file", "specify an acl file as <name>:<aclfile>")
+ fs.StringVar(&f.literal, "v23.permissions.literal", "", "explicitly specify the runtime acl as a JSON-encoded access.Permissions. Overrides all --v23.permissions.file flags.")
+ // TODO(ashankar): Older names: To be removed:
+ // See: https://github.com/veyron/release-issues/issues/1421
fs.Var(&f.fileFlag, "veyron.acl.file", "specify an acl file as <name>:<aclfile>")
fs.StringVar(&f.literal, "veyron.acl.literal", "", "explicitly specify the runtime acl as a JSON-encoded access.Permissions. Overrides all --veyron.acl.file flags.")
return f
}
-// SetDefaultProtocol sets the default protocol used when --veyron.tcp.protocol is
+// SetDefaultProtocol sets the default protocol used when --v23.tcp.protocol is
// not provided. It must be called before flags are parsed for it to take effect.
func SetDefaultProtocol(protocol string) {
listenMu.Lock()
@@ -299,7 +316,7 @@
listenMu.Unlock()
}
-// SetDefaultHostPort sets the default host and port used when --veyron.tcp.address
+// SetDefaultHostPort sets the default host and port used when --v23.tcp.address
// is not provided. It must be called before flags are parsed for it to take effect.
func SetDefaultHostPort(s string) {
listenMu.Lock()
@@ -307,7 +324,7 @@
listenMu.Unlock()
}
-// SetDefaultNamespaceRoot sets the default value for --veyron.namespacd.root
+// SetDefaultNamespaceRoot sets the default value for --v23.namespace.root
func SetDefaultNamespaceRoot(root string) {
namespaceMu.Lock()
defaultNamespaceRoot = root
@@ -333,6 +350,12 @@
}
f.addresses.flags = f
+ fs.Var(&f.protocol, "v23.tcp.protocol", "protocol to listen with")
+ fs.Var(&f.addresses, "v23.tcp.address", "address to listen on")
+ fs.StringVar(&f.ListenProxy, "v23.proxy", "", "object name of proxy service to use to export services across network boundaries")
+
+ // TODO(ashankar): Older names: To be removed:
+ // See: https://github.com/veyron/release-issues/issues/1421
fs.Var(&f.protocol, "veyron.tcp.protocol", "protocol to listen with")
fs.Var(&f.addresses, "veyron.tcp.address", "address to listen on")
fs.StringVar(&f.ListenProxy, "veyron.proxy", "", "object name of proxy service to use to export services across network boundaries")
diff --git a/lib/flags/flags_test.go b/lib/flags/flags_test.go
index 3de3c4e..d254996 100644
--- a/lib/flags/flags_test.go
+++ b/lib/flags/flags_test.go
@@ -26,7 +26,7 @@
}
creds := "creddir"
roots := []string{"ab:cd:ef"}
- args := []string{"--veyron.credentials=" + creds, "--veyron.namespace.root=" + roots[0]}
+ args := []string{"--v23.credentials=" + creds, "--v23.namespace.root=" + roots[0]}
fl.Parse(args, nil)
rtf := fl.RuntimeFlags()
if got, want := rtf.NamespaceRoots, roots; !reflect.DeepEqual(got, want) {
@@ -49,7 +49,7 @@
func TestAccessListFlags(t *testing.T) {
fs := flag.NewFlagSet("test", flag.ContinueOnError)
fl := flags.CreateAndRegister(fs, flags.Runtime, flags.AccessList)
- args := []string{"--veyron.acl.file=runtime:foo.json", "--veyron.acl.file=bar:bar.json", "--veyron.acl.file=baz:bar:baz.json"}
+ args := []string{"--v23.permissions.file=runtime:foo.json", "--v23.permissions.file=bar:bar.json", "--v23.permissions.file=baz:bar:baz.json"}
fl.Parse(args, nil)
aclf := fl.AccessListFlags()
@@ -70,7 +70,7 @@
func TestAccessListLiteralFlags(t *testing.T) {
fs := flag.NewFlagSet("test", flag.ContinueOnError)
fl := flags.CreateAndRegister(fs, flags.Runtime, flags.AccessList)
- args := []string{"--veyron.acl.literal=hedgehog"}
+ args := []string{"--v23.permissions.literal=hedgehog"}
fl.Parse(args, nil)
aclf := fl.AccessListFlags()
@@ -85,7 +85,7 @@
func TestAccessListLiteralBoth(t *testing.T) {
fs := flag.NewFlagSet("test", flag.ContinueOnError)
fl := flags.CreateAndRegister(fs, flags.Runtime, flags.AccessList)
- args := []string{"--veyron.acl.file=runtime:foo.json", "--veyron.acl.literal=hedgehog"}
+ args := []string{"--v23.permissions.file=runtime:foo.json", "--v23.permissions.literal=hedgehog"}
fl.Parse(args, nil)
aclf := fl.AccessListFlags()
@@ -102,7 +102,7 @@
fs.SetOutput(ioutil.Discard)
fl := flags.CreateAndRegister(fs, flags.Runtime)
addr := "192.168.10.1:0"
- args := []string{"--xxxveyron.tcp.address=" + addr, "not an arg"}
+ args := []string{"--xxxv23.tcp.address=" + addr, "not an arg"}
err := fl.Parse(args, nil)
if err == nil {
t.Fatalf("expected this to fail!")
@@ -113,7 +113,7 @@
fs = flag.NewFlagSet("test", flag.ContinueOnError)
fl = flags.CreateAndRegister(fs, flags.AccessList)
- args = []string{"--veyron.acl.file=noname"}
+ args = []string{"--v23.permissions.file=noname"}
err = fl.Parse(args, nil)
if err == nil {
t.Fatalf("expected this to fail!")
@@ -127,7 +127,7 @@
}
addr := "192.168.10.1:0"
roots := []string{"ab:cd:ef"}
- args := []string{"--veyron.tcp.address=" + addr, "--veyron.namespace.root=" + roots[0]}
+ args := []string{"--v23.tcp.address=" + addr, "--v23.namespace.root=" + roots[0]}
fl.Parse(args, nil)
lf := fl.ListenFlags()
if got, want := fl.RuntimeFlags().NamespaceRoots, roots; !reflect.DeepEqual(got, want) {
@@ -162,7 +162,7 @@
t.Errorf("got %q, want %q", got, want)
}
- if err := fl.Parse([]string{"--veyron.credentials=baz"}, nil); err != nil {
+ if err := fl.Parse([]string{"--v23.credentials=baz"}, nil); err != nil {
t.Fatalf("unexpected error: %s", err)
}
rtf = fl.RuntimeFlags()
@@ -180,7 +180,7 @@
if got, want := rtf.NamespaceRoots, []string{"a:1", "a:2"}; !reflect.DeepEqual(got, want) {
t.Errorf("got %q, want %q", got, want)
}
- if err := fl.Parse([]string{"--veyron.namespace.root=b:1", "--veyron.namespace.root=b:2", "--veyron.namespace.root=b:3", "--veyron.credentials=b:4"}, nil); err != nil {
+ if err := fl.Parse([]string{"--v23.namespace.root=b:1", "--v23.namespace.root=b:2", "--v23.namespace.root=b:3", "--v23.credentials=b:4"}, nil); err != nil {
t.Fatalf("unexpected error: %s", err)
}
rtf = fl.RuntimeFlags()
@@ -233,10 +233,10 @@
fl = flags.CreateAndRegister(flag.NewFlagSet("test", flag.ContinueOnError), flags.Listen)
if err := fl.Parse([]string{
- "--veyron.tcp.address=172.0.0.1:10", // Will default to protocol "wsh".
- "--veyron.tcp.protocol=tcp", "--veyron.tcp.address=127.0.0.10:34",
- "--veyron.tcp.protocol=ws4", "--veyron.tcp.address=127.0.0.10:44",
- "--veyron.tcp.protocol=tcp6", "--veyron.tcp.address=172.0.0.100:100"}, nil); err != nil {
+ "--v23.tcp.address=172.0.0.1:10", // Will default to protocol "wsh".
+ "--v23.tcp.protocol=tcp", "--v23.tcp.address=127.0.0.10:34",
+ "--v23.tcp.protocol=ws4", "--v23.tcp.address=127.0.0.10:44",
+ "--v23.tcp.protocol=tcp6", "--v23.tcp.address=172.0.0.100:100"}, nil); err != nil {
t.Fatalf("unexpected error: %s", err)
}
lf = fl.ListenFlags()
@@ -258,9 +258,9 @@
func TestDuplicateFlags(t *testing.T) {
fl := flags.CreateAndRegister(flag.NewFlagSet("test", flag.ContinueOnError), flags.Listen)
if err := fl.Parse([]string{
- "--veyron.tcp.address=172.0.0.1:10", "--veyron.tcp.address=172.0.0.1:10", "--veyron.tcp.address=172.0.0.1:34",
- "--veyron.tcp.protocol=tcp", "--veyron.tcp.address=172.0.0.1:10", "--veyron.tcp.address=172.0.0.1:10", "--veyron.tcp.address=172.0.0.1:34",
- "--veyron.tcp.protocol=ws", "--veyron.tcp.address=172.0.0.1:10", "--veyron.tcp.address=172.0.0.1:34", "--veyron.tcp.address=172.0.0.1:34"}, nil); err != nil {
+ "--v23.tcp.address=172.0.0.1:10", "--v23.tcp.address=172.0.0.1:10", "--v23.tcp.address=172.0.0.1:34",
+ "--v23.tcp.protocol=tcp", "--v23.tcp.address=172.0.0.1:10", "--v23.tcp.address=172.0.0.1:10", "--v23.tcp.address=172.0.0.1:34",
+ "--v23.tcp.protocol=ws", "--v23.tcp.address=172.0.0.1:10", "--v23.tcp.address=172.0.0.1:34", "--v23.tcp.address=172.0.0.1:34"}, nil); err != nil {
t.Fatalf("unexpected error: %s", err)
}
lf := fl.ListenFlags()
@@ -279,9 +279,9 @@
t.Fatalf("got %#v, want %#v", got, want)
}
if err := fl.Parse([]string{
- "--veyron.tcp.address=172.0.0.1:10", "--veyron.tcp.address=172.0.0.1:10", "--veyron.tcp.address=172.0.0.1:34",
- "--veyron.tcp.protocol=tcp", "--veyron.tcp.address=172.0.0.1:10", "--veyron.tcp.address=127.0.0.1:34", "--veyron.tcp.address=127.0.0.1:34",
- "--veyron.tcp.protocol=ws", "--veyron.tcp.address=172.0.0.1:10", "--veyron.tcp.address=127.0.0.1:34", "--veyron.tcp.address=127.0.0.1:34"}, nil); err != nil {
+ "--v23.tcp.address=172.0.0.1:10", "--v23.tcp.address=172.0.0.1:10", "--v23.tcp.address=172.0.0.1:34",
+ "--v23.tcp.protocol=tcp", "--v23.tcp.address=172.0.0.1:10", "--v23.tcp.address=127.0.0.1:34", "--v23.tcp.address=127.0.0.1:34",
+ "--v23.tcp.protocol=ws", "--v23.tcp.address=172.0.0.1:10", "--v23.tcp.address=127.0.0.1:34", "--v23.tcp.address=127.0.0.1:34"}, nil); err != nil {
t.Fatalf("unexpected error: %s", err)
}
if got, want := len(lf.Addrs), 6; got != want {
@@ -293,7 +293,7 @@
fl = flags.CreateAndRegister(flag.NewFlagSet("test", flag.ContinueOnError), flags.Runtime)
- if err := fl.Parse([]string{"--veyron.namespace.root=ab", "--veyron.namespace.root=xy", "--veyron.namespace.root=ab"}, nil); err != nil {
+ if err := fl.Parse([]string{"--v23.namespace.root=ab", "--v23.namespace.root=xy", "--v23.namespace.root=ab"}, nil); err != nil {
t.Fatalf("unexpected error: %s", err)
}
@@ -313,14 +313,14 @@
fs.StringVar(&testFlag2, "test_flag2", "default2", "")
fl := flags.CreateAndRegister(fs, flags.Runtime)
args := []string{
- "--veyron.namespace.root=argRoot1",
- "--veyron.namespace.root=argRoot2",
- "--veyron.vtrace.cache_size=1234",
+ "--v23.namespace.root=argRoot1",
+ "--v23.namespace.root=argRoot2",
+ "--v23.vtrace.cache-size=1234",
}
config := map[string]string{
- "veyron.namespace.root": "configRoot",
- "veyron.credentials": "configCreds",
- "veyron.vtrace.cache_size": "4321",
+ "v23.namespace.root": "configRoot",
+ "v23.credentials": "configCreds",
+ "v23.vtrace.cache-size": "4321",
"test_flag1": "test value",
"flag.that.does.not.exist": "some value",
}
@@ -386,7 +386,7 @@
fl := flags.CreateAndRegister(fs, flags.Runtime, flags.Listen)
nsRoot := "/127.0.1.1:10"
hostPort := "127.0.0.1:10"
- fl.Parse([]string{"--veyron.namespace.root", nsRoot, "--veyron.tcp.address", hostPort}, nil)
+ fl.Parse([]string{"--v23.namespace.root", nsRoot, "--v23.tcp.address", hostPort}, nil)
rtf := fl.RuntimeFlags()
if got, want := rtf.NamespaceRoots, []string{nsRoot}; !reflect.DeepEqual(got, want) {
t.Errorf("got %v, want %v", got, want)
diff --git a/profiles/internal/lib/websocket/hybrid.go b/profiles/internal/lib/websocket/hybrid.go
index d35c7d5..9e4e52a 100644
--- a/profiles/internal/lib/websocket/hybrid.go
+++ b/profiles/internal/lib/websocket/hybrid.go
@@ -32,7 +32,7 @@
// HybridListener returns a net.Listener that supports both tcp and
// websockets over the same, single, port. A listen address of
-// --veyron.tcp.protocol=wsh --veyron.tcp.address=127.0.0.1:8101 means
+// --v23.tcp.protocol=wsh --v23.tcp.address=127.0.0.1:8101 means
// that port 8101 can accept connections that use either tcp or websocket.
// The listener looks at the first 4 bytes of the incoming data stream
// to decide if it's a websocket protocol or not. These must be 'GET ' for
diff --git a/profiles/internal/naming/namespace/all_test.go b/profiles/internal/naming/namespace/all_test.go
index 3c21423..af205c2 100644
--- a/profiles/internal/naming/namespace/all_test.go
+++ b/profiles/internal/naming/namespace/all_test.go
@@ -766,4 +766,21 @@
if expected := true; mountEntry.IsLeaf != expected {
boom(t, "unexpected mountEntry.IsLeaf value. Got %v, expected %v", mountEntry.IsLeaf, expected)
}
+
+ c, err := ns.Glob(ctx, "leaf")
+ if err != nil {
+ boom(t, "ns.Glob failed: %v", err)
+ }
+ count := 0
+ for result := range c {
+ if me, ok := result.(*naming.MountEntry); ok {
+ count++
+ if expected := true; me.IsLeaf != expected {
+ boom(t, "unexpected me.IsLeaf value. Got %v, expected %v", me.IsLeaf, expected)
+ }
+ }
+ }
+ if count == 0 {
+ boom(t, "Glob did not return any results. Expected 1")
+ }
}
diff --git a/profiles/internal/naming/namespace/glob.go b/profiles/internal/naming/namespace/glob.go
index e0c26e0..f3c30b8 100644
--- a/profiles/internal/naming/namespace/glob.go
+++ b/profiles/internal/naming/namespace/glob.go
@@ -111,6 +111,7 @@
Name: naming.Join(t.me.Name, v.Value.Name),
Servers: v.Value.Servers,
ServesMountTable: v.Value.ServesMountTable,
+ IsLeaf: v.Value.IsLeaf,
},
depth: t.depth + 1,
}
diff --git a/profiles/internal/rpc/benchmark/README.txt b/profiles/internal/rpc/benchmark/README.txt
index 5b511f0..27fa43b 100644
--- a/profiles/internal/rpc/benchmark/README.txt
+++ b/profiles/internal/rpc/benchmark/README.txt
@@ -53,7 +53,7 @@
the first RPC.
$ v23 go run benchmarkd/main.go \
- -veyron.tcp.address=localhost:8888 -veyron.acl.literal='{"Read": {"In": ["..."]}}'
+ -v23.tcp.address=localhost:8888 -v23.permissions.literal='{"Read": {"In": ["..."]}}'
(In a different shell)
$ v23 go run benchmark/main.go \
@@ -112,7 +112,7 @@
about 22 ms, and streaming many 1 KB chunks takes about 6.5 ms per chunk.
-$ ./benchmarkd --address=localhost:8888 --veyron.acl.literal='{"...":"A"}'
+$ ./benchmarkd --address=localhost:8888 --v23.permissions.literal='{"...":"A"}'
$ ./benchmark --server=/localhost:8888 --count=10 --payload_size=1000
CallEcho 0 2573406000
diff --git a/profiles/internal/rpc/test/client_test.go b/profiles/internal/rpc/test/client_test.go
index c9f59df..681e072 100644
--- a/profiles/internal/rpc/test/client_test.go
+++ b/profiles/internal/rpc/test/client_test.go
@@ -698,7 +698,7 @@
t.Fatalf("unexpected error: %s", err)
}
defer sh.Cleanup(os.Stderr, os.Stderr)
- server, err := sh.Start("echoServer", nil, "--veyron.tcp.address=127.0.0.1:0", "mymessage", "")
+ server, err := sh.Start("echoServer", nil, "--v23.tcp.address=127.0.0.1:0", "mymessage", "")
if err != nil {
t.Fatalf("unexpected error: %s", err)
}
@@ -736,7 +736,7 @@
// Resurrect the server with the same address, verify client
// re-establishes the connection. This is racy if another
// process grabs the port.
- server, err = sh.Start("echoServer", nil, "--veyron.tcp.address="+ep.Address, "mymessage again", "")
+ server, err = sh.Start("echoServer", nil, "--v23.tcp.address="+ep.Address, "mymessage again", "")
if err != nil {
t.Fatalf("unexpected error: %s", err)
}
diff --git a/profiles/internal/rpc/test/proxy_test.go b/profiles/internal/rpc/test/proxy_test.go
index 78279d6..7249a3f 100644
--- a/profiles/internal/rpc/test/proxy_test.go
+++ b/profiles/internal/rpc/test/proxy_test.go
@@ -162,7 +162,7 @@
proxyListenSpec := rpc.ListenSpec{Addrs: rpc.ListenAddrs{{"tcp", "127.0.0.1:0"}}}
proxyListenSpec.Proxy = "proxy"
// The proxy uses websockets only, but the server is using tcp.
- testProxy(t, proxyListenSpec, "--veyron.tcp.protocol=ws")
+ testProxy(t, proxyListenSpec, "--v23.tcp.protocol=ws")
}
func testProxy(t *testing.T, spec rpc.ListenSpec, args ...string) {
diff --git a/profiles/internal/rt/rt_test.go b/profiles/internal/rt/rt_test.go
index e4f7c20..405a94e 100644
--- a/profiles/internal/rt/rt_test.go
+++ b/profiles/internal/rt/rt_test.go
@@ -276,10 +276,10 @@
defer os.RemoveAll(cdir2)
createCredentialsInDir(t, cdir2, "test_cmd")
- if got, want := collect(sh, credEnv, "--veyron.credentials="+cdir2), "test_cmd"; got != want {
+ if got, want := collect(sh, credEnv, "--v23.credentials="+cdir2), "test_cmd"; got != want {
t.Errorf("Without agent: got %q, want %q", got, want)
}
- if got, want := collect(agentSh, credEnv, "--veyron.credentials="+cdir2), "test_cmd"; got != want {
+ if got, want := collect(agentSh, credEnv, "--v23.credentials="+cdir2), "test_cmd"; got != want {
t.Errorf("With agent: got %q, want %q", got, want)
}
}
diff --git a/security/agent/agentd/main.go b/security/agent/agentd/main.go
index 5ac11be..6dc74ae 100644
--- a/security/agent/agentd/main.go
+++ b/security/agent/agentd/main.go
@@ -76,13 +76,13 @@
}
// This is a bit tricky. We're trying to share the runtime's
- // veyron.credentials flag. However we need to parse it before
+ // v23.credentials flag. However we need to parse it before
// creating the runtime. We depend on the profile's init() function
// calling flags.CreateAndRegister(flag.CommandLine, flags.Runtime)
// This will read the envvar.Credentials env var, then our call to
// flag.Parse() will take any override passed on the command line.
var dir string
- if f := flag.Lookup("veyron.credentials").Value; true {
+ if f := flag.Lookup("v23.credentials").Value; true {
dir = f.String()
// Clear out the flag value to prevent v23.Init from
// trying to load this password protected principal.
diff --git a/security/flag/flag.go b/security/flag/flag.go
index 7be9dd0..f8fbb97 100644
--- a/security/flag/flag.go
+++ b/security/flag/flag.go
@@ -21,7 +21,7 @@
const pkgPath = "v.io/x/ref/security/flag"
var (
- errCantOpenACLFile = verror.Register(pkgPath+".errCantOpenACLFile", verror.NoRetry, "{1:}{2:} cannot open argument to --veyron.acl.file {3}{:_}")
+ errCantOpenPermissionsFile = verror.Register(pkgPath+".errCantOpenPermissionsFile", verror.NoRetry, "{1:}{2:} cannot open argument to --v23.permissions.file {3}{:_}")
)
var authFlags *flags.Flags
@@ -30,8 +30,8 @@
authFlags = flags.CreateAndRegister(flag.CommandLine, flags.AccessList)
}
-// NewAuthorizerOrDie constructs an Authorizer based on the provided "--veyron.acl.literal" or
-// "--veyron.acl.file" flags. Otherwise it creates a default Authorizer.
+// NewAuthorizerOrDie constructs an Authorizer based on the provided "--v23.permissions.literal" or
+// "--v23.permissions.file" flags. Otherwise it creates a default Authorizer.
func NewAuthorizerOrDie() security.Authorizer {
flags := authFlags.AccessListFlags()
fname := flags.AccessListFile("runtime")
@@ -73,7 +73,7 @@
if literal == "" {
file, err := os.Open(fname)
if err != nil {
- return nil, verror.New(errCantOpenACLFile, nil, fname)
+ return nil, verror.New(errCantOpenPermissionsFile, nil, fname)
}
defer file.Close()
return access.ReadPermissions(file)
diff --git a/security/flag/flag_test.go b/security/flag/flag_test.go
index 7a53492..97c13c3 100644
--- a/security/flag/flag_test.go
+++ b/security/flag/flag_test.go
@@ -95,17 +95,17 @@
}{
{
cmd: "tamFromFlag",
- flags: []string{"--veyron.acl.file", "runtime:" + filename},
+ flags: []string{"--v23.permissions.file", "runtime:" + filename},
auth: "perms2",
},
{
cmd: "tamFromFlag",
- flags: []string{"--veyron.acl.literal", "{}"},
+ flags: []string{"--v23.permissions.literal", "{}"},
auth: "empty",
},
{
cmd: "tamFromFlag",
- flags: []string{"--veyron.acl.literal", `{"Read": {"In":["v23/alice/$", "v23/bob"]}, "Write": {"In":["v23/alice/$"]}}`},
+ flags: []string{"--v23.permissions.literal", `{"Read": {"In":["v23/alice/$", "v23/bob"]}, "Write": {"In":["v23/alice/$"]}}`},
auth: "perms2",
},
}
diff --git a/services/identity/identityd/identityd_v23_test.go b/services/identity/identityd/identityd_v23_test.go
index 5326c2f..923d72a 100644
--- a/services/identity/identityd/identityd_v23_test.go
+++ b/services/identity/identityd/identityd_v23_test.go
@@ -62,7 +62,7 @@
}
func V23TestIdentityServer(i *v23tests.T) {
- v23tests.RunRootMT(i, "--veyron.tcp.address=127.0.0.1:0")
+ v23tests.RunRootMT(i, "--v23.tcp.address=127.0.0.1:0")
// Start identityd:
//
// identityd must have credentials that recognize the root mounttable.
@@ -76,7 +76,7 @@
}
identityd = identityd.WithStartOpts(identityd.StartOpts().WithCustomCredentials(creds))
httpaddr := identityd.Start(
- "-veyron.tcp.address=127.0.0.1:0",
+ "-v23.tcp.address=127.0.0.1:0",
"-httpaddr=127.0.0.1:0").ExpectVar("HTTP_ADDR")
// Use the principal tool to seekblessings.
diff --git a/services/mgmt/application/applicationd/applicationd_v23_test.go b/services/mgmt/application/applicationd/applicationd_v23_test.go
index 79c08bd..dce2244 100644
--- a/services/mgmt/application/applicationd/applicationd_v23_test.go
+++ b/services/mgmt/application/applicationd/applicationd_v23_test.go
@@ -53,7 +53,7 @@
}
func V23TestApplicationRepository(i *v23tests.T) {
- v23tests.RunRootMT(i, "--veyron.tcp.address=127.0.0.1:0")
+ v23tests.RunRootMT(i, "--v23.tcp.address=127.0.0.1:0")
// Start the application repository.
appRepoName := "test-app-repo"
@@ -61,7 +61,7 @@
"-name="+appRepoName,
"-store="+i.NewTempDir(),
"-v=2",
- "-veyron.tcp.address=127.0.0.1:0")
+ "-v23.tcp.address=127.0.0.1:0")
// Build the client binary (must be a delegate of the server to pass
// the default authorization policy).
diff --git a/services/mgmt/binary/binaryd/binaryd_v23_test.go b/services/mgmt/binary/binaryd/binaryd_v23_test.go
index 83b2c94..0e93686 100644
--- a/services/mgmt/binary/binaryd/binaryd_v23_test.go
+++ b/services/mgmt/binary/binaryd/binaryd_v23_test.go
@@ -96,7 +96,7 @@
}
func V23TestBinaryRepositoryIntegration(i *v23tests.T) {
- v23tests.RunRootMT(i, "--veyron.tcp.address=127.0.0.1:0")
+ v23tests.RunRootMT(i, "--v23.tcp.address=127.0.0.1:0")
// Build the required binaries.
// The client must run as a "delegate" of the server in order to pass
@@ -111,7 +111,7 @@
binaryRepoBin.Start(
"-name="+binaryRepoName,
"-http=127.0.0.1:0",
- "-veyron.tcp.address=127.0.0.1:0")
+ "-v23.tcp.address=127.0.0.1:0")
// Upload a random binary file.
binFile := i.NewTempFile()
diff --git a/services/mgmt/build/buildd/buildd_v23_test.go b/services/mgmt/build/buildd/buildd_v23_test.go
index e365306..1eaba06 100644
--- a/services/mgmt/build/buildd/buildd_v23_test.go
+++ b/services/mgmt/build/buildd/buildd_v23_test.go
@@ -32,7 +32,7 @@
}
goRoot := runtime.GOROOT()
- v23tests.RunRootMT(i, "--veyron.tcp.address=127.0.0.1:0")
+ v23tests.RunRootMT(i, "--v23.tcp.address=127.0.0.1:0")
// Build binaries for the client and server.
// Since ACLs are not setup on the server, the client must pass the
@@ -49,7 +49,7 @@
"-name="+buildServerName,
"-gobin="+goBin,
"-goroot="+goRoot,
- "-veyron.tcp.address=127.0.0.1:0")
+ "-v23.tcp.address=127.0.0.1:0")
// Create and build a test source file.
testGoPath := i.NewTempDir()
diff --git a/services/mgmt/device/config/const.go b/services/mgmt/device/config/const.go
index c722c8d..e6d33ba 100644
--- a/services/mgmt/device/config/const.go
+++ b/services/mgmt/device/config/const.go
@@ -7,22 +7,22 @@
const (
// EnvelopeEnv is the name of the environment variable that holds the
// serialized device manager application envelope.
- EnvelopeEnv = "VEYRON_DM_ENVELOPE"
+ EnvelopeEnv = "V23_DM_ENVELOPE"
// PreviousEnv is the name of the environment variable that holds the
// path to the previous version of the device manager.
- PreviousEnv = "VEYRON_DM_PREVIOUS"
+ PreviousEnv = "V23_DM_PREVIOUS"
// OriginEnv is the name of the environment variable that holds the
// object name of the application repository that can be used to
// retrieve the device manager application envelope.
- OriginEnv = "VEYRON_DM_ORIGIN"
+ OriginEnv = "V23_DM_ORIGIN"
// RootEnv is the name of the environment variable that holds the
// path to the directory in which device manager workspaces are
// created.
- RootEnv = "VEYRON_DM_ROOT"
+ RootEnv = "V23_DM_ROOT"
// CurrentLinkEnv is the name of the environment variable that holds
// the path to the soft link that points to the current device manager.
- CurrentLinkEnv = "VEYRON_DM_CURRENT"
+ CurrentLinkEnv = "V23_DM_CURRENT"
// HelperEnv is the name of the environment variable that holds the path
// to the suid helper used to start apps as specific system users.
- HelperEnv = "VEYRON_DM_HELPER"
+ HelperEnv = "V23_DM_HELPER"
)
diff --git a/services/mgmt/device/deviced/commands.go b/services/mgmt/device/deviced/commands.go
index 822b3a2..87af138 100644
--- a/services/mgmt/device/deviced/commands.go
+++ b/services/mgmt/device/deviced/commands.go
@@ -27,7 +27,7 @@
initMode bool
)
-const deviceDirEnv = "VANADIUM_DEVICE_DIR"
+const deviceDirEnv = "V23_DEVICE_DIR"
func installationDir() string {
if d := os.Getenv(deviceDirEnv); d != "" {
diff --git a/services/mgmt/device/deviced/server.go b/services/mgmt/device/deviced/server.go
index b6be531..544f05c 100644
--- a/services/mgmt/device/deviced/server.go
+++ b/services/mgmt/device/deviced/server.go
@@ -42,7 +42,7 @@
publishAs = flag.String("name", "", "name to publish the device manager at")
restartExitCode = flag.Int("restart_exit_code", 0, "exit code to return when device manager should be restarted")
nhName = flag.String("neighborhood_name", "", `if provided, it will enable sharing with the local neighborhood with the provided name. The address of the local mounttable will be published to the neighboorhood and everything in the neighborhood will be visible on the local mounttable.`)
- dmPort = flag.Int("deviced_port", 0, "the port number of assign to the device manager service. The hostname/IP address part of --veyron.tcp.address is used along with this port. By default, the port is assigned by the OS.")
+ dmPort = flag.Int("deviced_port", 0, "the port number of assign to the device manager service. The hostname/IP address part of --v23.tcp.address is used along with this port. By default, the port is assigned by the OS.")
proxyPort = flag.Int("proxy_port", 0, "the port number to assign to the proxy service. 0 means no proxy service.")
usePairingToken = flag.Bool("use_pairing_token", false, "generate a pairing token for the device manager that will need to be provided when a device is claimed")
)
diff --git a/services/mgmt/device/impl/app_service.go b/services/mgmt/device/impl/app_service.go
index 69b3531..6d94a0f 100644
--- a/services/mgmt/device/impl/app_service.go
+++ b/services/mgmt/device/impl/app_service.go
@@ -838,7 +838,7 @@
cfg.Set(mgmt.ParentBlessingConfigKey, info.DeviceManagerPeerPattern)
appAclDir := filepath.Join(instanceDir, "debugacls", "data")
- cfg.Set("veyron.acl.file", "runtime:"+appAclDir)
+ cfg.Set("v23.permissions.file", "runtime:"+appAclDir)
// Set up any agent-specific state.
// NOTE(caprita): This ought to belong in genCmd.
@@ -882,7 +882,12 @@
agentCleaner()
}
- // Wait for the child process to start.
+ // Wait for the suidhelper to exit.
+ if err := handle.Wait(0); err != nil {
+ return 0, verror.New(ErrOperationFailed, ctx, fmt.Sprintf("Wait() on suidhelper failed: %v", err))
+ }
+
+ // Wait for the process invoked by suidhelper to become ready.
if err := handle.WaitForReady(childReadyTimeout); err != nil {
return 0, verror.New(ErrOperationFailed, ctx, fmt.Sprintf("WaitForReady(%v) failed: %v", childReadyTimeout, err))
}
diff --git a/services/mgmt/device/impl/device_installer.go b/services/mgmt/device/impl/device_installer.go
index d880d36..5fbd73e 100644
--- a/services/mgmt/device/impl/device_installer.go
+++ b/services/mgmt/device/impl/device_installer.go
@@ -81,8 +81,7 @@
// TODO(caprita,ashankar): Remove VEYRON_.* and NAMESPACE_ROOT.*.
var allowedVarsRE = regexp.MustCompile("V23_.*|VEYRON_.*|NAMESPACE_ROOT.*|PAUSE_BEFORE_STOP|TMPDIR")
-// TODO(caprita,ashankar): Replace VEYRON_EXEC_VERSION with V23_EXEC_VERSION
-var deniedVarsRE = regexp.MustCompile("VEYRON_EXEC_VERSION")
+var deniedVarsRE = regexp.MustCompile("V23_EXEC_VERSION")
// filterEnvironment returns only the environment variables, specified by
// the env parameter, whose names match the supplied regexp.
diff --git a/services/mgmt/device/starter/starter.go b/services/mgmt/device/starter/starter.go
index 2128cf2..31f167a 100644
--- a/services/mgmt/device/starter/starter.go
+++ b/services/mgmt/device/starter/starter.go
@@ -218,7 +218,7 @@
// actual proxy app. Once support is added to the RPC layer to allow
// install-local to serve on the same connection it established to the
// device manager (see TODO in
- // veyron/tools/mgmt/device/impl/local_install.go), we can get rid of
+ // v.io/x/ref/cmd/mgmt/device/impl/local_install.go), we can get rid of
// this local proxy altogether.
stopProxy, err := startProxyServer(ctx, args.Proxy, mtName)
if err != nil {
diff --git a/services/mgmt/lib/testutil/modules.go b/services/mgmt/lib/testutil/modules.go
index 3337061..9fa84fc 100644
--- a/services/mgmt/lib/testutil/modules.go
+++ b/services/mgmt/lib/testutil/modules.go
@@ -68,7 +68,7 @@
// startRootMT sets up a root mount table for tests.
func startRootMT(t *testing.T, sh *modules.Shell) (string, modules.Handle) {
- h, err := sh.Start("rootMT", nil, "--veyron.tcp.address=127.0.0.1:0")
+ h, err := sh.Start("rootMT", nil, "--v23.tcp.address=127.0.0.1:0")
if err != nil {
t.Fatalf("failed to start root mount table: %s", err)
}
diff --git a/services/mgmt/profile/profiled/profiled_v23_test.go b/services/mgmt/profile/profiled/profiled_v23_test.go
index bcb5ecd..073076c 100644
--- a/services/mgmt/profile/profiled/profiled_v23_test.go
+++ b/services/mgmt/profile/profiled/profiled_v23_test.go
@@ -45,14 +45,14 @@
}
func V23TestProfileRepository(i *v23tests.T) {
- v23tests.RunRootMT(i, "--veyron.tcp.address=127.0.0.1:0")
+ v23tests.RunRootMT(i, "--v23.tcp.address=127.0.0.1:0")
// Start the profile repository.
profileRepoName := "test-profile-repo"
profileRepoStore := i.NewTempDir()
args := []string{
"-name=" + profileRepoName, "-store=" + profileRepoStore,
- "-veyron.tcp.address=127.0.0.1:0",
+ "-v23.tcp.address=127.0.0.1:0",
}
i.BuildV23Pkg("v.io/x/ref/services/mgmt/profile/profiled").Start(args...)
diff --git a/services/mgmt/suidhelper/impl/args.go b/services/mgmt/suidhelper/impl/args.go
index f124081..8081a26 100644
--- a/services/mgmt/suidhelper/impl/args.go
+++ b/services/mgmt/suidhelper/impl/args.go
@@ -46,7 +46,7 @@
LogDir string
}
-const SavedArgs = "VEYRON_SAVED_ARGS"
+const SavedArgs = "V23_SAVED_ARGS"
var (
flagUsername, flagWorkspace, flagLogDir, flagRun, flagProgName *string
diff --git a/services/mounttable/lib/mounttable.go b/services/mounttable/lib/mounttable.go
index e40e986..e9af895 100644
--- a/services/mounttable/lib/mounttable.go
+++ b/services/mounttable/lib/mounttable.go
@@ -602,6 +602,7 @@
if err := n.satisfies(mt, call, resolveTags); err == nil {
me.Servers = m.servers.copyToSlice()
me.ServesMountTable = n.mount.mt
+ me.IsLeaf = n.mount.leaf
} else {
me.Servers = []naming.MountedServer{}
}
diff --git a/services/mounttable/mounttabled/mounttabled_v23_test.go b/services/mounttable/mounttabled/mounttabled_v23_test.go
index e1b6d91..57bc59a 100644
--- a/services/mounttable/mounttabled/mounttabled_v23_test.go
+++ b/services/mounttable/mounttabled/mounttabled_v23_test.go
@@ -35,7 +35,7 @@
func V23TestMount(i *v23tests.T) {
neighborhood := fmt.Sprintf("test-%s-%d", getHostname(i), os.Getpid())
- v23tests.RunRootMT(i, "--veyron.tcp.address=127.0.0.1:0", "--neighborhood_name="+neighborhood)
+ v23tests.RunRootMT(i, "--v23.tcp.address=127.0.0.1:0", "--neighborhood_name="+neighborhood)
name, _ := i.GetVar(envvar.NamespacePrefix)
clientBin := binaryWithCredentials(i, "cmd", "v.io/x/ref/cmd/mounttable")
diff --git a/services/proxy/proxyd/proxyd_v23_test.go b/services/proxy/proxyd/proxyd_v23_test.go
index 2723e51..795ade3 100644
--- a/services/proxy/proxyd/proxyd_v23_test.go
+++ b/services/proxy/proxyd/proxyd_v23_test.go
@@ -33,7 +33,7 @@
}
func V23TestProxyd(t *v23tests.T) {
- v23tests.RunRootMT(t, "--veyron.tcp.address=127.0.0.1:0")
+ v23tests.RunRootMT(t, "--v23.tcp.address=127.0.0.1:0")
var (
proxydCreds, _ = t.Shell().NewChildCredentials("proxyd")
serverCreds, _ = t.Shell().NewChildCredentials("server")
@@ -42,7 +42,7 @@
)
// Start proxyd
proxyd.WithStartOpts(proxyd.StartOpts().WithCustomCredentials(proxydCreds)).
- Start("--veyron.tcp.address=127.0.0.1:0", "--name="+proxyName)
+ Start("--v23.tcp.address=127.0.0.1:0", "--name="+proxyName)
// Start the server that only listens via the proxy
if _, err := t.Shell().StartWithOpts(
t.Shell().DefaultStartOpts().WithCustomCredentials(serverCreds),
diff --git a/services/security/groups/grpserverd/main.go b/services/security/groups/grpserverd/main.go
index dab3768..b5d2c3d 100644
--- a/services/security/groups/grpserverd/main.go
+++ b/services/security/groups/grpserverd/main.go
@@ -6,7 +6,7 @@
package main
// Example invocation:
-// grpserverd --veyron.tcp.address="127.0.0.1:0" --name=grpserverd
+// grpserverd --v23.tcp.address="127.0.0.1:0" --name=grpserverd
import (
"flag"
diff --git a/test/testutil/rand.go b/test/testutil/rand.go
index c6db6d7..e6ef82b 100644
--- a/test/testutil/rand.go
+++ b/test/testutil/rand.go
@@ -15,7 +15,7 @@
)
const (
- SeedEnv = "VANADIUM_RNG_SEED"
+ SeedEnv = "V23_RNG_SEED"
)
// An instance of Random initialized by the InitRandomGenerator function.
@@ -71,7 +71,7 @@
}
// Create a new pseudo-random number generator, the seed may be supplied
-// by the VANADIUM_RNG_SEED to allow for reproducing a previous sequence.
+// by V23_RNG_SEED to allow for reproducing a previous sequence.
func NewRandGenerator() *Random {
seed := time.Now().UnixNano()
seedString := os.Getenv(SeedEnv)
diff --git a/test/v23tests/v23tests_test.go b/test/v23tests/v23tests_test.go
index f14eade..f3c5382 100644
--- a/test/v23tests/v23tests_test.go
+++ b/test/v23tests/v23tests_test.go
@@ -50,7 +50,7 @@
env := v23tests.New(t)
defer env.Cleanup()
- v23tests.RunRootMT(env, "--veyron.tcp.address=127.0.0.1:0")
+ v23tests.RunRootMT(env, "--v23.tcp.address=127.0.0.1:0")
proxyBin := env.BuildV23Pkg("v.io/x/ref/services/proxy/proxyd")
nsBin := env.BuildGoPkg("v.io/x/ref/cmd/namespace")
@@ -59,7 +59,7 @@
t.Fatalf("expected a mount table name")
}
- proxy := proxyBin.Start("--veyron.tcp.address=127.0.0.1:0", "-name=proxyd")
+ proxy := proxyBin.Start("--v23.tcp.address=127.0.0.1:0", "-name=proxyd")
proxyName := proxy.ExpectVar("NAME")
proxyAddress, _ := naming.SplitAddressName(proxyName)
@@ -315,7 +315,7 @@
t.Fatalf("%q does not contain %q", got, want)
}
}()
- v23tests.RunRootMT(env, "--xxveyron.tcp.address=127.0.0.1:0")
+ v23tests.RunRootMT(env, "--xxv23.tcp.address=127.0.0.1:0")
}
func TestWaitTimeout(t *testing.T) {