Security

last person joined: yesterday 

Forum to discuss Enterprise security using HPE Aruba Networking NAC solutions (ClearPass), Introspect, VIA, 360 Security Exchange, Extensions, and Policy Enforcement Firewall (PEF).
Expand all | Collapse all

Mailgun integration into CPPM

This thread has been viewed 1 times
  • 1.  Mailgun integration into CPPM

    Posted May 29, 2017 09:39 PM

    I was wondering if someone made integration into Clearpass.

     

    I tried to add server into:

    Administration » External Servers » Endpoint Context Servers

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

    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



  • 2.  RE: Mailgun integration into CPPM
    Best Answer

    EMPLOYEE
    Posted Jun 01, 2017 10:19 PM

    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



  • 3.  RE: Mailgun integration into CPPM

    Posted Jun 01, 2017 10:43 PM

    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?



  • 4.  RE: Mailgun integration into CPPM

    Posted Jun 01, 2017 11:04 PM

    Ok found it

     

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

    URL in the ACTION should be: /YOUR_FULL_DOMAIN/messages



  • 5.  RE: Mailgun integration into CPPM

    EMPLOYEE
    Posted Jun 01, 2017 11:20 PM
    Yeah, either way. /domain/ can go in base URL or action. Doesn’t matter.