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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
|
#! /bin/bash
echo "Pushing default policies"
# Sometimes brmsgw gets an error when trying to retrieve the policies on initial push,
# so for the BRMS policies we will do a push, then delete from the pdp group, then push again.
# Second push should be successful.
echo "pushPolicy : PUT : com.vFirewall"
curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
"pdpGroup": "default",
"policyName": "com.vFirewall",
"policyType": "MicroService"
}' 'http://pdp:8081/pdp/api/pushPolicy'
sleep 2
echo "pushPolicy : PUT : com.vLoadBalancer"
curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
"pdpGroup": "default",
"policyName": "com.vLoadBalancer",
"policyType": "MicroService"
}' 'http://pdp:8081/pdp/api/pushPolicy'
sleep 2
echo "pushPolicy : PUT : com.BRMSParamvLBDemoPolicy"
curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
"pdpGroup": "default",
"policyName": "com.BRMSParamvLBDemoPolicy",
"policyType": "BRMS_Param"
}' 'http://pdp:8081/pdp/api/pushPolicy'
sleep 2
echo "pushPolicy : PUT : com.BRMSParamvFWDemoPolicy"
curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
"pdpGroup": "default",
"policyName": "com.BRMSParamvFWDemoPolicy",
"policyType": "BRMS_Param"
}' 'http://pdp:8081/pdp/api/pushPolicy'
sleep 2
echo "deletePolicy : DELETE : com.vFirewall"
curl -v --silent -X DELETE --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
"pdpGroup": "default",
"policyComponent": "PDP",
"policyName": "com.vFirewall",
"policyType": "MicroService"
}' 'http://pdp:8081/pdp/api/deletePolicy'
sleep 2
echo "deletePolicy : DELETE : com.vLoadBalancer"
curl -v --silent -X DELETE --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
"pdpGroup": "default",
"policyComponent": "PDP",
"policyName": "com.vLoadBalancer",
"policyType": "MicroService"
}' 'http://pdp:8081/pdp/api/deletePolicy'
sleep 2
echo "deletePolicy : DELETE : com.BRMSParamvFWDemoPolicy"
curl -v --silent -X DELETE --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
"pdpGroup": "default",
"policyComponent": "PDP",
"policyName": "com.BRMSParamvFWDemoPolicy",
"policyType": "BRMS_Param"
}' 'http://pdp:8081/pdp/api/deletePolicy'
sleep 2
echo "deletePolicy : DELETE : com.BRMSParamvLBDemoPolicy"
curl -v --silent -X DELETE --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
"pdpGroup": "default",
"policyComponent": "PDP",
"policyName": "com.BRMSParamvLBDemoPolicy",
"policyType": "BRMS_Param"
}' 'http://pdp:8081/pdp/api/deletePolicy'
sleep 2
echo "pushPolicy : PUT : com.vFirewall"
curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
"pdpGroup": "default",
"policyName": "com.vFirewall",
"policyType": "MicroService"
}' 'http://pdp:8081/pdp/api/pushPolicy'
sleep 2
echo "pushPolicy : PUT : com.vLoadBalancer"
curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
"pdpGroup": "default",
"policyName": "com.vLoadBalancer",
"policyType": "MicroService"
}' 'http://pdp:8081/pdp/api/pushPolicy'
sleep 2
echo "pushPolicy : PUT : com.BRMSParamvLBDemoPolicy"
curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
"pdpGroup": "default",
"policyName": "com.BRMSParamvLBDemoPolicy",
"policyType": "BRMS_Param"
}' 'http://pdp:8081/pdp/api/pushPolicy'
sleep 2
echo "pushPolicy : PUT : com.BRMSParamvFWDemoPolicy"
curl -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
"pdpGroup": "default",
"policyName": "com.BRMSParamvFWDemoPolicy",
"policyType": "BRMS_Param"
}' 'http://pdp:8081/pdp/api/pushPolicy'
|