Added env var
This commit is contained in:
parent
008379f8e1
commit
3f1355c8b8
|
@ -38,6 +38,7 @@ CISCO_USER=serti.xx
|
|||
CISCO_PASSWORD=senhadacontroladoracisco
|
||||
|
||||
# Palo Alto
|
||||
PA_HOST=10.1.0.2
|
||||
PA_USER=pti
|
||||
PA_PASSWORD=senhadopaloaltocompermissaoparaapi
|
||||
PA_NET=10.7.
|
|
@ -29,24 +29,25 @@ async function updateUserIdMappings() {
|
|||
|
||||
await Promise.all(
|
||||
wifiDevices.map(async device => {
|
||||
const cmd = `
|
||||
<uid-message>
|
||||
<version>1.0</version>
|
||||
<type>update</type>
|
||||
<payload>
|
||||
<login>
|
||||
<entry name="ifms\\${device.user.sAMAccountName}" ip="${device.ip}" timeout="5">
|
||||
</entry>
|
||||
</login>
|
||||
</payload>
|
||||
</uid-message>
|
||||
`
|
||||
return axios.get(
|
||||
'https://10.7.0.2/api/',
|
||||
`https://${process.env.PA_HOST}/api/`,
|
||||
|
||||
{
|
||||
params: {
|
||||
type: 'user-id',
|
||||
cmd: `
|
||||
<uid-message>
|
||||
<version>1.0</version>
|
||||
<type>update</type>
|
||||
<payload>
|
||||
<login>
|
||||
<entry name="ifms\\${device.user.sAMAccountName}" ip="${device.ip}" timeout="5">
|
||||
</entry>
|
||||
</login>
|
||||
</payload>
|
||||
</uid-message>
|
||||
`
|
||||
cmd
|
||||
},
|
||||
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
||||
httpsAgent: agent,
|
||||
|
|
Loading…
Reference in New Issue
Block a user