Security

Reply
mke
Occasional Contributor II

Mailgun integration into CPPM

I was wondering if someone made integration into Clearpass.

 

I tried to add server into:

Administration » External Servers » Endpoint Context Servers

server

Then:

Administration » Dictionaries » Context Server Actions

Screen Shot 2017-05-29 at 2.19.36 PM.png

 

I created generic HTTP context server but I have no idea what to put exactly into HEADERS, CONTENT, ATTRIBUTES

 

After I used my info example from below works fine in my OS terminal

 

curl -s --user 'api:MY_KEY' \
    https://api.mailgun.net/v3/sandboxaMY_NUMBER.mailgun.org/messages \
    -F from='Excited User <mailgun@sandboxaMY_NUMBER.mailgun.org>' \
    -F to='test@test.com' \
    -F subject='Hello' \
    -F text='Testing some Mailgun awesomness!'

Here is Mailgun API info  https://documentation.mailgun.com/api-intro.html#introduction

 


Here I found old way of integrating similar service from SendGrid but their API has changed
https://community.arubanetworks.com/t5/ClearPass-Recipes/SendGrid-Email-Notification/ta-p/204343

Guru Elite

Re: Mailgun integration into CPPM

Username should be: api

Password: < your-api-key >

 

In the Endpoint Context Server Actions config:

 

Action

 

ecsa_mailgun_action.png

URL: 

/messages

 

Header:

 

ecsa_mailgun_header.png

 

Content-Type     application/x-www-form-urlencoded

Content:

Notice that the contents are URL encoded with the exception of dynamic ClearPass variables (those will be encoded after they are replaced). 

 

ecsa_mailgun_content.png

 

from=Aruba+Boston+%3Cno-reply%40arubaboston.com%3E&to=%{Endpoint:Email}&subject=Device+Quarantined&text=Your+device+has+been+blocked+from+the+network+due+to+abuse.+Please+contact+the+help+desk%2E

Here is a good URL encoding tool: https://www.freeformatter.com/url-encoder.html


Tim Cappalli | Aruba Security TME
@timcappalli | timcappalli.me | ACMX #367 / ACCX #480
mke
Occasional Contributor II

Re: Mailgun integration into CPPM

Sth is still not working

 

Screen Shot 2017-06-01 at 10.36.49 PM.png

 

Screen Shot 2017-06-01 at 10.36.02 PM.png

 

Screen Shot 2017-06-01 at 10.36.12 PM.png

 

Screen Shot 2017-06-01 at 10.36.19 PM.png

 

What could be wrong?

mke
Occasional Contributor II

Re: Mailgun integration into CPPM

Ok found it

 

BASE URL should be: https://api.mailgun.net/v3

URL in the ACTION should be: /YOUR_FULL_DOMAIN/messages

Guru Elite

Re: Mailgun integration into CPPM

Yeah, either way. /domain/ can go in base URL or action. Doesn’t matter.

Tim Cappalli | Aruba Security TME
@timcappalli | timcappalli.me | ACMX #367 / ACCX #480
Search Airheads
cancel
Showing results for 
Search instead for 
Did you mean: