- CheckMates
- :
- Products
- :
- Developers
- :
- Ansible
- :
- Re: Support for api key
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Are you a member of CheckMates?
×- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Support for api key
As R80.40 support users with API key, we need a method to login using this feature.
Keys are easier to work with in automation and I think the code only needs a small adjustment to support this.
if command == "login":
...
if command == "login-api":
# Login parameters:
api_key = parameters.get("user", parameters.get("api-key"))
...
# Tries to login:
client.login_with_api_key(api_key, domain=domain, payload=payload)
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This collection was necessary because Ansible did not have any support for Check Point management. This did not happen until Ansible 2.9. If this module is being used, I recommended updating playbooks to use the official management API modules collection. If you would still rather use the github repository rather than ansible galaxy, then the new module (synced with Ansible Galaxy) should be used.
- https://github.com/CheckPointSW/CheckPointAnsibleMgmtCollection
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Use of API keys have been supported since the 1.0.5 release of the Ansible module.
- https://github.com/CheckPointSW/CheckPointAnsibleMgmtCollection/releases/tag/1.0.5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you!
I looked into https://github.com/CheckPointSW/cpAnsible.
What is the reason to have this as well?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This collection was necessary because Ansible did not have any support for Check Point management. This did not happen until Ansible 2.9. If this module is being used, I recommended updating playbooks to use the official management API modules collection. If you would still rather use the github repository rather than ansible galaxy, then the new module (synced with Ansible Galaxy) should be used.
- https://github.com/CheckPointSW/CheckPointAnsibleMgmtCollection
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Harald,
Indeed, the API Key is supported since R80.40 (Management API v1.6).
Administrators of Management Server can use this method of authentication along with other existing methods.
Of course, a corresponding administrator account should be set to use this method, and an API key should be generated.
This configuration can be done in the SmartConsole, or using the Management API:
https://sc1.checkpoint.com/documents/latest/APIs/#cli/add-api-key~v1.6%20
https://sc1.checkpoint.com/documents/latest/APIs/#cli/add-administrator~v1.6%20
The login command can be found here.