Fix webservice to add functions functions related to serviceManagement
Description
We cannot do any operations on services
Distribution Name and Version
Debian Buster
FusionDirectory Version
1.4
Plugin with the defect
webservice
PHP version used
php7
Origin of php packages
Debian
Steps to Reproduce
- Create a server with argonautDNSConfig as service
- Source the script and run the command
#!/bin/env bash
declare URL='https://demo-dev-all-buster.fusiondirectory.org/fusiondirectory//rest.php/v1/'
declare LOGIN='X'
declare PASSWORD='X'
# Short CURL
function C(){
command -- "curl" "-s" "-H" "Content-Type: application/json" "${URL}${@}"
}
# Grab TOKEN
TOKEN=$(C \
'/login' \
-X POST \
--data \
'{
"user": "'"$LOGIN"'",
"password": "'"$PASSWORD"'"
}'
)
TOKEN=$(tr -d '"' <<< "$TOKEN")
# Redfine C
function C(){
command -- "curl" "-s" "-H" "Content-Type: application/json" "-H" "SESSION-TOKEN: $TOKEN" "${URL}${@}" | jq .
}
C /objects/server/cn=demo-dev,ou=servers,ou=systems,dc=demo-fusiondirectory,dc=org/servicesManagement
{}
- the result doesn't show the argonautDNSConfig service
Expected behavior:
We must see something like
Argonaut DNS settings
And be able to see the content and modify / add other services
Actual behavior:
Actually, it shows an empty JSON
Reproduces how often: 100