Comments (8)
Strike that, I missed the fact the dependencies have been reworked in commit 7778512
So I'll have to re-check why this still happens.
from tang.
Strike that, I missed the fact the dependencies have been reworked in commit 7778512
So I'll have to re-check why this still happens.
Did you have that commit in your build? It's not part of any release, so it's likely you don't have it applied there.
from tang.
Yeah, I realized too late this bug report was based on the latest release. However, it still happens if I include that commit, so it's certainly still an issue. At the moment however I'm stuck figuring what triggers tangd-update invocation now. It does happen, but why?
from tang.
Could you try #53 and report back, please?
from tang.
Will do in a moment, just want to share the analysis I did:
Starting with @jwkdir@ and @cachedir@ empty.
Requesting an advertisement using
echo foo | clevis encrypt tang '{"url": "http://<tang-server>/"}' > bar.txt
which results in an error:
Unable to fetch advertisement: 'http://<tang-server>/adv/'!
This is the output of "journalctl -o short-precise", with timestamps of the created files merged, ordered by time.
Nov 28 11:38:25.272465 freekeh systemd[1]: Starting Tang Server key generation script...
-rw-r--r-- 1 root root 354 2020-11-28 11:38:25.401147740 +0100 @dbdir@/OCWpHA3_4-E9mUpyW_0N3-Crcoc.jwk
Nov 28 11:38:25.457995 freekeh systemd[1]: Starting Tang Server key update script...
So update is started ...
-rw-r--r-- 1 root root 349 2020-11-28 11:38:25.531138284 +0100 @dbdir@/tPfTOakfqz0qMjjloGn6v989ttc.jwk
... before keygen finished the job. Also, update will ignore the second .jwk (not shown here)
Nov 28 11:38:25.557283 freekeh systemd[1]: tangd-keygen.service: Succeeded.
Nov 28 11:38:25.575785 freekeh systemd[1]: Started Tang Server key generation script.
Nov 28 11:38:25.597302 freekeh systemd[1]: Started Tang Server (<client>:54812).
And now the server is started although update is still running.
Nov 28 11:38:25.630481 freekeh tangd[2709]: <client> GET /adv/ => 404 (src/tangd.c:70)
... hence the 404
Nov 28 11:38:25.639115 freekeh systemd[1]: tangd@1-<server>:80-<client>:54812.service: Succeeded.
-rw-r--r-- 1 root root 618 2020-11-28 11:38:25.761121554 +0100 @cachedir@/default.jws
The update script needed 180ms to parse the .jwk and create the first .jws. This is the earliest moment where the server may be run. But to be safe, this should rather happen after update finished the job which took ...
(...)
lrwxrwxrwx 1 root root 44 2020-11-28 11:38:28.280938310 +0100 @cachedir@/MQHhVWoc4arWBQYK1wHf69l4dnXsX7fC2nZ7JAem1-3zyU53bUBjcOqtMCaB8WFRrvXX6g9pSz2AcgWRpWMAbw.jwk -> @dbdir@/tPfTOakfqz0qMjjloGn6v989ttc.jwk
... another 2520ms.
Nov 28 11:38:28.558664 freekeh systemd[1]: tangd-update.service: Succeeded.
Nov 28 11:38:28.561176 freekeh systemd[1]: Started Tang Server key update script.
So far I'm not convinced using the systemd semantics to resolve dependencies are the best idea.
from tang.
from tang.
@cbiedl: can close this, now that #53 has been merged?
from tang.
ACK, none of this still applies.
from tang.
Related Issues (20)
- "Not on the same physical medium" security requirement for Tang server and clients HOT 1
- Tang server does not deliver keys HOT 12
- README.md: 404 on link to Docker container HOT 5
- Tang running in standalone mode is leaving defunct processes after each request is served
- Release version 13
- Include parameter to change URL path prefix where server is listening
- Fedora rawhide container failing due to issues on dnf.conf format HOT 2
- Similar protocol with proof HOT 3
- Github actions related to code (build, coverage) should not be executed on documentation changes
- Release version 14
- [minor] Check for ss before testing
- Avoid clang compiler warning
- Possibly increase adv-standalone test timeout HOT 3
- Tang in early boot
- Allow binding tang http server to a given IP address
- Adapt Github actions to avoid Node16 and upgrade to Node20 HOT 1
- Release version 15
- ECMR Doc - Need to create JWE in browser
- Update documentation for 'optional' configurations (SSL/TLS & Authentication)
- Create advertisements offline HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tang.