-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
keystore commands for ox #588
Commits on Aug 26, 2024
-
Add the PATCH /object/path/:ns/:kind/:name/keys api handler
For cfg, sec and usr objects. Example: $ curl -s -k -o- -u cva:xxx -X PATCH -H "Content-Type: application/json" --data '[{"key": "foo1", "bytes": "YmFyCg==", "action": "add"},{"key": "foo2", "string": "bar", "action": "add"}]' https://localhost:1215/object/path/test/cfg/hdoc/keys $ om test/cfg/hdoc decode --key foo1 bar $ om test/cfg/hdoc decode --key foo2 bar
Configuration menu - View commit details
-
Copy full SHA for c611de9 - Browse repository at this point
Copy the full SHA c611de9View commit details -
Add more object kvstore handlers
GET /object/path/:ns/:kind/:name/kvstore?key=k1&key=k2 PATCH /object/path/:ns/:kind/:name/kvstore GET /object/path/:ns/:kind/:name/kvstore/entry?key=... POST /object/path/:ns/:kind/:name/kvstore/entry?key=... DELETE /object/path/:ns/:kind/:name/kvstore/entry?key=...
Configuration menu - View commit details
-
Copy full SHA for b5e6030 - Browse repository at this point
Copy the full SHA b5e6030View commit details -
GET /object/path/:ns/:kind/:name/kvstore/keys
Configuration menu - View commit details
-
Copy full SHA for 7be39d0 - Browse repository at this point
Copy the full SHA 7be39d0View commit details -
Make the client code do the keystore --from to []byte work
This code was in object.Keystore instances. Move it to util/uri so omcmd and oxcmd can use it. Remove these from the Keystore interface: * AddKeyFrom * PrepareAddKeyFrom * ChangeKeyFrom * PrepareChangeKeyFrom It's much more sane to have the client download or read local files himself, instead of allowing a read privilege escalation via the daemon api or "sudo om cfg add --key".
Configuration menu - View commit details
-
Copy full SHA for a884906 - Browse repository at this point
Copy the full SHA a884906View commit details
Commits on Aug 27, 2024
-
Configuration menu - View commit details
-
Copy full SHA for a696fe0 - Browse repository at this point
Copy the full SHA a696fe0View commit details -
Make the kvstore commands work with a object selector
Example: root@dev2n1:~/dev/om3# bin/ox system/** keys OBJECT NODE KEY system/sec/ca dev2n1 private_key system/sec/ca dev2n1 certificate system/sec/ca dev2n1 certificate_chain system/sec/ca dev2n1 fullpem system/sec/cert dev2n1 private_key system/sec/cert dev2n1 certificate system/sec/cert dev2n1 certificate_chain system/sec/cert dev2n1 fullpem system/usr/cva dev2n1 password
Configuration menu - View commit details
-
Copy full SHA for d98ffe7 - Browse repository at this point
Copy the full SHA d98ffe7View commit details -
Add the value size to "om ** keys" items
Example: $ bin/ox '**' keys OBJECT NODE KEY SIZE system/sec/cert dev2n1 private_key 4606 system/sec/cert dev2n1 certificate 2582 system/sec/cert dev2n1 certificate_chain 4658 system/sec/cert dev2n1 fullpem 8982 test/cfg/hdoc dev2n1 config.json 1159 test/cfg/hdoc dev2n1 foo1 15 test/cfg/hdoc dev2n1 hosts 8 test/cfg/hdoc dev2n1 protocols 4199 test/cfg/hdoc dev2n1 foo2 4199 system/sec/ca dev2n1 private_key 4606 system/sec/ca dev2n1 certificate 2642 system/sec/ca dev2n1 certificate_chain 2642 system/sec/ca dev2n1 fullpem 6962 system/usr/cva dev2n1 password 194 cfg/foo2 dev2n2 foo 11
Configuration menu - View commit details
-
Copy full SHA for 22fcfe3 - Browse repository at this point
Copy the full SHA 22fcfe3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7a67709 - Browse repository at this point
Copy the full SHA 7a67709View commit details
Commits on Aug 28, 2024
-
* Implement the "add|change --from <dir>" * Make change behave as a upsert. add is the action to use when you don't want to overwrite existing keys. * Use the PATCH /object/path/:ns/:kd/:name/kvstore handler to add and change keys, as --from <dir> can feed multiple keys at once. The change is transactional: either all or no key changes are commited.
Configuration menu - View commit details
-
Copy full SHA for edbc42d - Browse repository at this point
Copy the full SHA edbc42dView commit details -
Fix daemon panic on object.New<interface> uses
object.New<interface> should verify the type cast worked, and raise a new object.ErrWrongType error if not. The api handlers now emit a "Bad Request" response if they get a object.ErrWrongType, and "Internal Server Error" is still used for all other errors.
Configuration menu - View commit details
-
Copy full SHA for 2c04e4c - Browse repository at this point
Copy the full SHA 2c04e4cView commit details -
Fix a stack on malformed config update orders
For example: $ om foo set --kw fs#1type=flag would panic on: panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0xc8b545] goroutine 1 [running]: github.com/cvaroqui/ini.(*Key).Value(...) /root/go/pkg/mod/github.com/cvaroqui/[email protected]/key.go:110 github.com/opensvc/om3/core/xconfig.(*T).set.func1({{{0xc003da00d0, 0x8}, {0x0, 0x0}}, 0x1, {0xc003da00d9, 0x4}, 0x0}) /root/dev/om3/core/xconfig/main.go:527 +0x65 Add a test, so that this bogus set would produce a clean: Error: invalid key in fs#1type=flag
Configuration menu - View commit details
-
Copy full SHA for ba3d704 - Browse repository at this point
Copy the full SHA ba3d704View commit details