docker-credential-helper: Support variable server names#228
docker-credential-helper: Support variable server names#228ricardosalveti merged 1 commit intofoundriesio:masterfrom
Conversation
|
|
||
| if [ "$1" = "get" ] ; then | ||
| exec /usr/bin/aktualizr-get --loglevel $LOGLEVEL -u https://ota-lite.foundries.io:8443/hub-creds/ | ||
| server=$(cat /var/sota/sota.toml | grep ^server | head -n1 | cut -d\" -f2) |
There was a problem hiding this comment.
One problem is that this helper will be called by any user, and only root will have access to sota.toml, so that will let to a permission denied issue when called as fio (or any normal user).
So I would probably move the default server settings above this line (server="https://ota-lite.foundries.io:8443") and check if enough permission to parse sota.toml, and then update the variable if another server is available.
You can also drop cat and head by having one single grep call instead, such as:
grep -m1 ^server /var/sota/sota.toml | cut -d\" -f2
There was a problem hiding this comment.
i've been thinking the same thing. its really confusing right now. this would help usability.
52b627c to
51434ef
Compare
| echo "ERROR: Device does not appear to be registered under $SOTA_DIR" | ||
| exit 1 | ||
| fi | ||
| server=$(cat ${SOTA_DIR}/sota.toml | grep -m1 ^server | cut -d\" -f2) |
There was a problem hiding this comment.
no need for cat here, you can just grep the file directly
This allows the script to use the configured tls.server to grab credentials from. This will become important when customers have their own device gateway urls. Signed-off-by: Andy Doan <[email protected]>
Relevant changes: - 07c9d8e Merge pull request #239 from YoeDistro/yoe/mut - 25c9178 layers: Add langdale to LAYERSERIES_COMPAT - 6f9430d Merge pull request #231 from chrisdimich/master - c51905a nitrogen6sx: add required uboot variables for u-boot-boundary - 7aef299 Merge pull request #228 from angolini/rm-machines - 10bf4d7 imx7d-remarkable2: Remove machine - cb7ad45 ventana: Remove the machine - 4bced88 Merge pull request #226 from chrisdimich/master - fa0d5ec linux-boundary: bump revision to eb43cb07 - cd59504 Merge pull request #224 from chrisdimich/master - 18fe766 imx-atf-boundary: update do_deploy to fix binary path as per imx-boot - 3d0130f Merge pull request #222 from sergioprado/colibri-imx6-bootscript - 596d36a colibri-imx6: use soft assignment for u-boot-default-script provider - dfae23f Merge pull request #220 from MaxKrummenacher/master - 28aac37 mqxboot: prevent oe qa error, gnu_hash - 7e2e2d8 libmcc: prevent oe qa error, gnu_hash - 7a86916 kernel-module-mcc-toradex: cope with changes to kernel module build - 936a385 colibri-vf: use linux-toradex independent of the bsp - e59062b vf: follow SoC override changes also for vybrid - 6ee01e2 u-boot-timesys: remove 2011.12 recipe - f405db7 Merge pull request #217 from chrisdimich/master - cc9c239 linux-boundary: Upgrade to 5.15 - 80e234f Merge pull request #214 from MaxKrummenacher/u-boot-compat - fb198b6 Merge pull request #213 from MaxKrummenacher/master - 7f43964 machines: follow kernel deployment changes - 2454fc6 u-boot-toradex_2020.07: change to be compatible with any bsp Signed-off-by: Daiane Angolini <[email protected]>
Bumping fsnotify to version v1.5.1-7-gaf855d7
We update the license checksum, due to new copyright dates, and include
the following commits:
af855d7 Final Notice: Maintainers Wanted
62a598a maintainers wanted
d696f5c revise contributing
6e1d4e4 update readme
83f9fe6 Test on Go 1.18 and two most recent versions (#411)
0aba082 Update issue templates (#410)
3eb7fa4 Removed dead link
466b39d prepare 1.5.1, retract 1.5.0
b98ede5 Revert "Add AddRaw to not follow symlinks + Fix link folloing on Windows (#289)"
dfdb645 revise pull request template
08848a0 v1.5.0 preparation (#380)
e2e9517 Add AddRaw to not follow symlinks + Fix link folloing on Windows (#289)
82ee6f3 Update test matrix for go 1.17 stable release (#385)
16f0d42 add //go:build lines + add 1.17.0-rc2 to test matrix (#377)
cc8365b Update x/sys to latest (#379)
2fb15b1 Drop support/testing for Go 1.11 and earlier (#381)
5ce1ba4 Remove Travis CI and references
ed6d2f5 Add lint+vet+old versions to GitHub Action
42e9219 introduce GitHub Actions
7f4cf4d Fix unsafe pointer conversion (#325)
45d7d09 Move example usage to the readme
4bf2d1f Updating the FAQ section for supportability with NFS & FUSE filesystems.
dc27d96 drop 1.8.x from Travis CI
fce5a44 2019
ecf2c4d revise editor config
0a05407 Add Go modules
ab058b4 readme: plan to support fanotify
924410f Open files with CLOEXEC
1485a34 Also create epoll and pipe fds with close-on-exec (#155) (#219)
11844c0 readme: remove AppVeyor badge
85de84f Add windows to travis matrix
2216558 Fix lint issue with error doc string
9152fb1 only run golint on latest version of go
ccc981b Check if channels are closed in the example (#244)
1f285c6 darwin tests: Exchangedata is deprecated on 10.13
7b866c9 travis: less verbose tests
8ba2b19 [#234] t.Fatalf -> t.Errorf in go routines (#266)
70cc4a1 Fix TestInotifyOverflow (#265)
1d13583 TravisCI: updating test versions
c282820 v1.4.7
a6f391c travis: test on Go 1.9.x
ea33dcb Fix missing verb on format string (#228)
3d33f50 Fix possible deadlock on closing the watcher on kqueue (#230)
4da3e2c Fix deadlock in Remove (linux/inotify)
ff7bc41 Watch.Add improvements (avoid race, fix consistency, reduce garbage) (#189)
7d7316e travis: update for Go 1.8
a904159 Moved FAQ into the README
fd9ec7d Properly handle inotify's IN_Q_OVERFLOW event (#149)
bd2828f replace references to OS X with macOS
629574c v1.4.2
abf5e85 pull request and issue template (#179)
11054bc Create inotify fd with close-on-exec (#178)
944cff2 v1.4.1
5c1390e deflake inotify stress test (#177)
b4f2a68 rm go1.5.4 from travis config since the linter doesn't build in 1.5 (#175)
c07fd86 readme: remove gocover.io badge
b3baf18 update link to contributing to external git repos
26b17cd v1.4.0
c3181d8 add @oozie to AUTHORS
55579be Add a String() func to Event.Op (#165)
f12c623 Bump Travis to Go 1.6.3 (#156)
a8a77c9 v1.3.1
51d3cc5 Use filepath.Join() (#153)
30411db global: switch to x/sys/unix
836bfd9 Update Travis config to Go 1.5.4 and 1.6.1
Signed-off-by: Bruce Ashfield <[email protected]>
This allows the script to use the configured tls.server to grab
credentials from. This will become important when customers have their
own device gateway urls.
Signed-off-by: Andy Doan [email protected]