Skip to content
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

test: create_test_target: enable target security token authentication via MGMT API #76

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion test/create_test_target
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/sh
#
# Uses hawkBit MGMT REST API to create a target with a defined security token:
# Uses hawkBit MGMT REST API to enable target security token authentication and
# to create a target with a defined security token:
#
# [{
# "controllerId":"test-controller",
Expand All @@ -12,6 +13,12 @@
HAWKBIT_SERVER="localhost:8080"
HAWKBIT_SERVER_LOGIN="admin:admin"

curl "http://${HAWKBIT_SERVER}/rest/v1/system/configs/authentication.targettoken.enabled" \
-u ${HAWKBIT_SERVER_LOGIN} \
-X PUT \
-H "Content-Type: application/json;charset=UTF-8" -i \
-d '{"value" : true}'

curl "http://${HAWKBIT_SERVER}/rest/v1/targets" \
-u ${HAWKBIT_SERVER_LOGIN} \
-X POST \
Expand Down