Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
a3d3ea2b
Commit
a3d3ea2b
authored
May 03, 2017
by
neil
Committed by
GitHub
May 03, 2017
Browse files
Merge pull request #815 from ka2er/dev
less permissive permission on OVH API
parents
0a2ab2ae
f5c381d5
Changes
1
Show whitespace changes
Inline
Side-by-side
dnsapi/dns_ovh.sh
View file @
a3d3ea2b
...
...
@@ -119,7 +119,7 @@ dns_ovh_add() {
_info
"Checking authentication"
response
=
"
$(
_ovh_rest GET
"domain
/
"
)
"
response
=
"
$(
_ovh_rest GET
"domain"
)
"
if
_contains
"
$response
"
"INVALID_CREDENTIAL"
;
then
_err
"The consumer key is invalid:
$OVH_CK
"
_err
"Please retry to create a new one."
...
...
@@ -191,7 +191,7 @@ _ovh_authentication() {
_H3
=
""
_H4
=
""
_ovhdata
=
'{"accessRules": [{"method": "GET","path": "/
*"},{"method": "POST","path": "/*
"},{"method": "P
U
T","path": "/
*
"},{"method": "
DELETE
","path": "/*"}],"redirection":"'
$ovh_success
'"}'
_ovhdata
=
'{"accessRules": [{"method": "GET","path": "/
auth/time"},{"method": "GET","path": "/domain"},{"method": "GET","path": "/domain/zone/*"},{"method": "GET","path": "/domain/zone/*/record"},{"method": "POST","path": "/domain/zone/*/record
"},{"method": "P
OS
T","path": "/
domain/zone/*/refresh
"},{"method": "
PUT
","path": "/
domain/zone/*/record/
*"}],"redirection":"'
$ovh_success
'"}'
response
=
"
$(
_post
"
$_ovhdata
"
"
$OVH_API
/auth/credential"
)
"
_debug3 response
"
$response
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment