New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

clearpasspy

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clearpasspy

ClearPass API Python Library

  • 1.1.3
  • PyPI
  • Socket score

Maintainers
1

Python class for Aruba's Clearpass Policy Manager

https://www.emerickcc.com

Aruba Networks

Examples

from clearpasspy import Clearpass
# Client_ID: clearpassapi
# Grant Type: client_credentials OR password
# client Secret: <CLIENT SECRET FROM UI>
# Tackle first: client credentials
server = '<SERVER NAME>'
grant_type = 'client_credentials'
client_secret = 'SUPER SECRET'
client_id = 'clearpassapi'

data = {
    'server' : server,
    'grant_type' : grant_type,
    'secret' : client_secret,
    'client' : client_id
}

# When you create the object, it automatically authenticates you, and stores the access token for subsequent calls.
CPPM = ClearPass(data)
print(CPPM.access_token)
3ea61fd137df506515ae45f0887df1163c4080f9

# Takes MAC address with or without colons
print(CPPM.online_status('0000af23e980'))
True

# Takes 1 arg for limiting output. . max is 1000
print(CPPM.get_endpoints(10))
[{'id': 4814, 'mac_address': '0000e349473f', 'status': 'Unknown', 'attributes': {}, '_links': {'self': {'href': 'https://clearpass.server.com/api/endpoint/4814'}}}

# Print Endpoint by ID
print('Endpoint: {}'.format(CPPM.get_endpoint(4814)))
Endpoint {'id': 4814, 'mac_address': '0000e349473f', 'status': 'Unknown', 'attributes': {}, '_links': {'self': {'href': 'https://clearpass.server.com/api/endpoint/4814'}}}

# Calls API endpoint. Only supports GET method
print('API Call: {}'.format(CPPM.api('/auth-method')))

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc