summaryrefslogtreecommitdiffstats
path: root/scripts/hbac-mod2.sh
blob: 174d6a02e270ac18ab369f1541dd598d1f7a94b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/sh +x

. ./include.sh

json="{
    \"method\": \"hbac_mod\",
    \"params\": [
        [ \"test\" ],
        {
            \"description\": \"\",
            \"accessruletype\": \"deny\",
            \"hostcategory\": \"\",
            \"servicecategory\": \"\",
            \"sourcehostcategory\": \"\",
            \"usercategory\": \"\",
            \"all\": true,
            \"rights\": true
        }
    ],
    \"id\": 0
}"

curl\
  -H "Content-Type:application/json"\
  -H "Accept:applicaton/json"\
  --negotiate -u :\
  --cacert /etc/ipa/ca.crt\
  -d "$json"\
  -X POST\
  $IPA_JSON_URL