FINBOURNE Identity Service API
Project description
finbourne-identity-sdk
FINBOURNE Technology
This Python package is automatically generated by the OpenAPI Generator project:
- API version: 0.0.2832
- Package version: 2.0.40
- Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit https://www.finbourne.com
Requirements.
Python 3.7+
Installation & Usage
pip install
If the python package is hosted on a repository, you can install directly using:
pip install git+https://github.com/finbourne/finbourne-identity-sdk-python.git
(you may need to run pip
with root permission: sudo pip install git+https://github.com/finbourne/finbourne-identity-sdk-python.git
)
Then import the package:
import finbourne_identity
Setuptools
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install
to install the package for all users)
Then import the package:
import finbourne_identity
Tests
Execute pytest
to run the tests.
Getting Started
You'll need to provide some configuration to connect to the finbourne_identity application. These can be provided using a secrets file or environment variables.
Environment variables
In order to use short lived access tokens you will need to have appropriate values set for the following environment variables:
FBN_TOKEN_URL,
FBN_FINBOURNE_IDENTITY_API_URL,
FBN_USERNAME,
FBN_PASSWORD,
FBN_CLIENT_ID,
FBN_CLIENT_SECRET,
FBN_ACCESS_TOKEN
To use a long lived Personal Access Token, you must provide the following environment variables:
FBN_FINBOURNE_IDENTITY_API_URL,
FBN_ACCESS_TOKEN
You can send your requests to finbourne_identity via a proxy, by setting FBN_PROXY_ADDRESS
.
If your proxy has basic auth enabled, you must akso supply FBN_PROXY_USERNAME
and FBN_PROXY_PASSWORD
Secrets file
In order to use short lived access tokens you will need to have appropriate values set in a secrets.json
file in the same folder as your script.
{
"api":
{
"tokenUrl":"<your-token-url>",
"finbourne_identityUrl":"<FINBOURNE-application-url>",
"username":"<your-username>",
"password":"<your-password>",
"clientId":"<your-client-id>",
"clientSecret":"<your-client-secret>",
}
}
To use a long lived Personal Access Token, you must provide a secrets.json
with the following variables:
{
"api":
{
"finbourne_identityUrl":"<FINBOURNE-application-url>",
"accessToken":"<your-access-token>"
}
}
You can send your requests to finbourne_identity via a proxy, by adding a proxy section to your secrets.json
.
If your proxy has basic auth enabled, you must also supply a username
and password
in this section.
{
"api":
{
"finbourne_identityUrl":"<FINBOURNE-application-url>",
"accessToken":"<your-access-token>"
},
"proxy":
{
"address":"<your-proxy-address>",
"username":"<your-proxy-username>",
"password":"<your-proxy-password>"
}
}
Using the SDK
Please follow the installation procedure and then run the following:
import time
import finbourne_identity
from finbourne_identity.exceptions import ApiException
from pprint import pprint
import os
from finbourne_identity import (
ApiClientFactory,
ApplicationMetadataApi,
EnvironmentVariablesConfigurationLoader,
SecretsFileConfigurationLoader,
ArgsConfigurationLoader
)
# Use the finbourne_identity ApiClientFactory to build Api instances with a configured api client
# By default this will read config from environment variables
# Then from a secrets.json file found in the current working directory
api_client_factory = ApiClientFactory()
# The ApiClientFactory can be passed an iterable of configuration loaders to read configuration from
api_url = "https://fbn-prd.lusid.com/identity"
# Path to a secrets.json file containing authentication credentials
# See https://support.lusid.com/knowledgebase/article/KA-01667/en-us
# for a detailed guide to setting up the SDK make authenticated calls to LUSID APIs
secrets_path = os.getenv("FBN_SECRETS_PATH")
app_name="LusidJupyterNotebook"
config_loaders = [
EnvironmentVariablesConfigurationLoader(),
SecretsFileConfigurationLoader(api_secrets_file=secrets_path),
ArgsConfigurationLoader(api_url=api_url, app_name=app_name)
]
api_client_factory = ApiClientFactory(config_loaders=config_loaders)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Enter a context with an instance of the ApiClientFactory to ensure the connection pool is closed after use
async with api_client_factory:
# Create an instance of the API class
api_instance = api_client_factory.build(ApplicationMetadataApi)
try:
# [EARLY ACCESS] ListAccessControlledResources: Get resources available for access control
api_response = await api_instance.list_access_controlled_resources()
print("The response of ApplicationMetadataApi->list_access_controlled_resources:\n")
pprint(api_response)
except ApiException as e:
print("Exception when calling ApplicationMetadataApi->list_access_controlled_resources: %s\n" % e)
Documentation for API Endpoints
All URIs are relative to https://fbn-prd.lusid.com/identity
Class | Method | HTTP request | Description |
---|---|---|---|
ApplicationMetadataApi | list_access_controlled_resources | GET /api/metadata/access/resources | [EARLY ACCESS] ListAccessControlledResources: Get resources available for access control |
ApplicationsApi | create_application | POST /api/applications | [EARLY ACCESS] CreateApplication: Create Application |
ApplicationsApi | delete_application | DELETE /api/applications/{id} | [EARLY ACCESS] DeleteApplication: Delete Application |
ApplicationsApi | get_application | GET /api/applications/{id} | [EARLY ACCESS] GetApplication: Get Application |
ApplicationsApi | list_applications | GET /api/applications | [EARLY ACCESS] ListApplications: List Applications |
ApplicationsApi | rotate_application_secrets | POST /api/applications/{id}/lifecycle/$newsecret | [EARLY ACCESS] RotateApplicationSecrets: Rotate Application Secrets |
AuthenticationApi | get_authentication_information | GET /api/authentication/information | GetAuthenticationInformation: Gets AuthenticationInformation |
AuthenticationApi | get_password_policy | GET /api/authentication/password-policy/{userType} | [EXPERIMENTAL] GetPasswordPolicy: Gets password policy for a user type |
AuthenticationApi | get_support_access_history | GET /api/authentication/support | [EARLY ACCESS] GetSupportAccessHistory: Get the history of all support access granted and any information pertaining to their termination |
AuthenticationApi | get_support_roles | GET /api/authentication/support-roles | [EARLY ACCESS] GetSupportRoles: Get mapping of support roles, the internal representation to a human friendly representation |
AuthenticationApi | grant_support_access | POST /api/authentication/support | [EARLY ACCESS] GrantSupportAccess: Grants FINBOURNE support access to your account |
AuthenticationApi | invalidate_support_access | DELETE /api/authentication/support | [EARLY ACCESS] InvalidateSupportAccess: Revoke any FINBOURNE support access to your account |
AuthenticationApi | update_password_policy | PUT /api/authentication/password-policy/{userType} | [EXPERIMENTAL] UpdatePasswordPolicy: Updates password policy for a user type |
IdentityProviderApi | add_scim | PUT /api/identityprovider/scim | [EARLY ACCESS] AddScim: Add SCIM |
IdentityProviderApi | remove_scim | DELETE /api/identityprovider/scim | [EARLY ACCESS] RemoveScim: Remove SCIM |
MeApi | get_user_info | GET /api/me | [EARLY ACCESS] GetUserInfo: Get User Info |
MeApi | set_password | PUT /api/me/password | SetPassword: Set password of current user |
PersonalAuthenticationTokensApi | create_api_key | POST /api/keys | [EARLY ACCESS] CreateApiKey: Create a Personal Access Token |
PersonalAuthenticationTokensApi | delete_api_key | DELETE /api/keys/{id} | [EARLY ACCESS] DeleteApiKey: Invalidate a Personal Access Token |
PersonalAuthenticationTokensApi | list_own_api_keys | GET /api/keys | [EARLY ACCESS] ListOwnApiKeys: Gets the meta data for all of the user's existing Personal Access Tokens. |
RolesApi | add_user_to_role | PUT /api/roles/{id}/users/{userId} | [EARLY ACCESS] AddUserToRole: Add User to Role |
RolesApi | create_role | POST /api/roles | [EARLY ACCESS] CreateRole: Create Role |
RolesApi | delete_role | DELETE /api/roles/{id} | [EARLY ACCESS] DeleteRole: Delete Role |
RolesApi | get_role | GET /api/roles/{id} | [EARLY ACCESS] GetRole: Get Role |
RolesApi | list_roles | GET /api/roles | [EARLY ACCESS] ListRoles: List Roles |
RolesApi | list_users_in_role | GET /api/roles/{id}/users | [EARLY ACCESS] ListUsersInRole: Get the users in the specified role. |
RolesApi | remove_user_from_role | DELETE /api/roles/{id}/users/{userId} | [EARLY ACCESS] RemoveUserFromRole: Remove User from Role |
RolesApi | update_role | PUT /api/roles/{id} | [EARLY ACCESS] UpdateRole: Update Role |
TokensApi | invalidate_token | DELETE /api/tokens | [EARLY ACCESS] InvalidateToken: Invalidate current JWT token (sign out) |
UsersApi | create_user | POST /api/users | [EARLY ACCESS] CreateUser: Create User |
UsersApi | delete_user | DELETE /api/users/{id} | [EARLY ACCESS] DeleteUser: Delete User |
UsersApi | expire_password | POST /api/users/{id}/lifecycle/$expirepassword | [EARLY ACCESS] ExpirePassword: Reset the user's password to a temporary one |
UsersApi | find_users_by_id | GET /api/directory | [EARLY ACCESS] FindUsersById: Find users by id endpoint |
UsersApi | get_user | GET /api/users/{id} | [EARLY ACCESS] GetUser: Get User |
UsersApi | list_runnable_users | GET /api/users/$runnable | [EARLY ACCESS] ListRunnableUsers: List Runable Users |
UsersApi | list_users | GET /api/users | [EARLY ACCESS] ListUsers: List Users |
UsersApi | reset_factors | POST /api/users/{id}/lifecycle/$resetfactors | [EARLY ACCESS] ResetFactors: Reset MFA factors |
UsersApi | reset_password | POST /api/users/{id}/lifecycle/$resetpassword | [EARLY ACCESS] ResetPassword: Reset Password |
UsersApi | send_activation_email | POST /api/users/{id}/lifecycle/$activate | [EARLY ACCESS] SendActivationEmail: Sends an activation email to the User |
UsersApi | unlock_user | POST /api/users/{id}/lifecycle/$unlock | [EARLY ACCESS] UnlockUser: Unlock User |
UsersApi | unsuspend_user | POST /api/users/{id}/lifecycle/$unsuspend | [EXPERIMENTAL] UnsuspendUser: Unsuspend user |
UsersApi | update_user | PUT /api/users/{id} | [EARLY ACCESS] UpdateUser: Update User |
Documentation For Models
- AccessControlledAction
- AccessControlledResource
- ActionId
- AddScimResponse
- ApiKey
- AuthenticationInformation
- CreateApiKey
- CreateApplicationRequest
- CreateRoleRequest
- CreateUserRequest
- CreatedApiKey
- CurrentUserResponse
- ErrorDetail
- IdSelectorDefinition
- IdentifierPartSchema
- Link
- ListUsersResponse
- LusidProblemDetails
- LusidValidationProblemDetails
- OAuthApplication
- PasswordPolicyResponse
- PasswordPolicyResponseAge
- PasswordPolicyResponseComplexity
- PasswordPolicyResponseConditions
- PasswordPolicyResponseLockout
- ResourceListOfAccessControlledResource
- RoleId
- RoleResponse
- SetPassword
- SetPasswordResponse
- SupportAccessExpiry
- SupportAccessExpiryWithRole
- SupportAccessRequest
- SupportAccessResponse
- SupportRole
- SupportRolesResponse
- TemporaryPassword
- UpdatePasswordPolicyRequest
- UpdatePasswordPolicyRequestAge
- UpdatePasswordPolicyRequestComplexity
- UpdatePasswordPolicyRequestConditions
- UpdatePasswordPolicyRequestLockout
- UpdateRoleRequest
- UpdateUserRequest
- UserResponse
- UserSummary
Documentation For Authorization
Authentication schemes defined for the API:
oauth2
- Type: OAuth
- Flow: implicit
- Authorization URL: https://lusid.okta.com/oauth2/default/v1/authorize
- Scopes: N/A
Author
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for finbourne_identity_sdk-2.0.40.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3887cdb5189ece863bfd9b86b255674504f11904c04744f555e824b589142b15 |
|
MD5 | 5da34470cdf260922c0969153b4dd3ab |
|
BLAKE2b-256 | 3c728eba50fa72aabcd406d335528ae5b61bff841f85aef54c7375dd2df21e56 |
Hashes for finbourne_identity_sdk-2.0.40-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 527a44cf8f6735a606b01d7b6ed6fa33fd93a9f7a5717f147872011d397640ef |
|
MD5 | c1307c5bd058b72c64799de4ad7484cf |
|
BLAKE2b-256 | cedc3cfe494881092171ac6a9a5f48c81d69b12e3dcaab736e66c1046bfbef74 |