-
Notifications
You must be signed in to change notification settings - Fork 1
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
uSync.Triggers #2
Comments
A Beta for experimentation and feedback is here : |
Re the Guid on the querying, whilst good to ensure the request was intentional and lines up with the config, it’s not very hidden and would be potentially discoverable. At minimum I wonder if this should be a POST request so the key isn’t present in the querystring and maybe you could also require https. Better might be some kind of authentication to prevent someone else attempting to run a command |
yep - this is where i need some feedback, I can build timestamped / hashed auth. its a question of how easy that would be to put into people's CI/CD pipeline, I suppose i could have a console app that hashes, keys and does the posts, (so its not running curl, etc). then the auth could be more complex while not over complicating command line stuff. |
Added authentication following the models builder code (but using Authorization vs Action) so example would be : curl -u [email protected]:password https://localhost:port/umbraco/usync/trigger/import?key=[key] will only work if the user has access to the settings section. however i need to test:
|
OK - it does lockout after invalid password attempts ✔️ |
Fast and furious - beta002 (should have called this an alpha!)
curl examplesimport:
import with optionse.g Import only settings:
|
Personally I'm not a big fan of tying CI/CD operations to users in the Umbraco backend. If an admin forgets the password and resets it, the automation will stop working. |
beta004 (https://www.nuget.org/packages/uSync.Triggers/8.9.7-beta004) now lets you choose between basic (username/password) and HMAC signature authentication. in the site web.config
If you use HMAC you then need something to generate the HMAC key - so you can't just use CURL. so the uSyncTriggersCLI package ( https://www.nuget.org/packages/uSyncTriggerCLI ) can be used for that.
it can also be used for basic auth
|
Feature Proposal : An unauthenticated (but secured) method for triggering uSync actions (e.g import or export).
See : https://github.com/KevinJump/uSync8/tree/v8/dev-api-trigger/uSync.Triggers
uSync.Triggers will be a separate package you can install to add a trigger end point to your site, that you can then use from command lines, or CI/CD pipelines to trigger uSync commands.
e.g
http:;//myumbraco.site/umbraco/usync/trigger/import?key=[YOUR-GUID-VALUE]
Alongside Import you will also be able to trigger an export.
additional options for a trigger will be:
At the moment the process returns a string. indicating the number of changes and number of items eg.
The text was updated successfully, but these errors were encountered: