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.2930
- Package version: 2.1.30
- 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
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:
# 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 | 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 | 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 | GetSupportRoles: Get mapping of support roles, the internal representation to a human friendly representation |
AuthenticationApi | grant_support_access | POST /api/authentication/support | GrantSupportAccess: Grants FINBOURNE support access to your account |
AuthenticationApi | invalidate_support_access | DELETE /api/authentication/support | 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 | AddScim: Add SCIM |
IdentityProviderApi | remove_scim | DELETE /api/identityprovider/scim | RemoveScim: Remove SCIM |
MeApi | get_user_info | GET /api/me | GetUserInfo: Get User Info |
MeApi | set_password | PUT /api/me/password | SetPassword: Set password of current user |
PersonalAuthenticationTokensApi | create_api_key | POST /api/keys | CreateApiKey: Create a Personal Access Token |
PersonalAuthenticationTokensApi | delete_api_key | DELETE /api/keys/{id} | DeleteApiKey: Invalidate a Personal Access Token |
PersonalAuthenticationTokensApi | list_own_api_keys | GET /api/keys | 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} | AddUserToRole: Add User to Role |
RolesApi | create_role | POST /api/roles | CreateRole: Create Role |
RolesApi | delete_role | DELETE /api/roles/{id} | DeleteRole: Delete Role |
RolesApi | get_role | GET /api/roles/{id} | GetRole: Get Role |
RolesApi | list_roles | GET /api/roles | ListRoles: List Roles |
RolesApi | list_users_in_role | GET /api/roles/{id}/users | ListUsersInRole: Get the users in the specified role. |
RolesApi | remove_user_from_role | DELETE /api/roles/{id}/users/{userId} | RemoveUserFromRole: Remove User from Role |
RolesApi | update_role | PUT /api/roles/{id} | UpdateRole: Update Role |
TokensApi | invalidate_token | DELETE /api/tokens | InvalidateToken: Invalidate current JWT token (sign out) |
UsersApi | create_user | POST /api/users | CreateUser: Create User |
UsersApi | delete_user | DELETE /api/users/{id} | DeleteUser: Delete User |
UsersApi | expire_password | POST /api/users/{id}/lifecycle/$expirepassword | ExpirePassword: Reset the user's password to a temporary one |
UsersApi | find_users_by_id | GET /api/directory | FindUsersById: Find users by id endpoint |
UsersApi | get_user | GET /api/users/{id} | GetUser: Get User |
UsersApi | list_runnable_users | GET /api/users/$runnable | [EARLY ACCESS] ListRunnableUsers: List Runable Users |
UsersApi | list_users | GET /api/users | ListUsers: List Users |
UsersApi | reset_factors | POST /api/users/{id}/lifecycle/$resetfactors | ResetFactors: Reset MFA factors |
UsersApi | reset_password | POST /api/users/{id}/lifecycle/$resetpassword | ResetPassword: Reset Password |
UsersApi | send_activation_email | POST /api/users/{id}/lifecycle/$activate | SendActivationEmail: Sends an activation email to the User |
UsersApi | unlock_user | POST /api/users/{id}/lifecycle/$unlock | UnlockUser: Unlock User |
UsersApi | unsuspend_user | POST /api/users/{id}/lifecycle/$unsuspend | [EXPERIMENTAL] UnsuspendUser: Unsuspend user |
UsersApi | update_user | PUT /api/users/{id} | 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.1.30.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd0f7a456d0a14499bfffc03831aa477bf3e46957c20c8801bb229fda16096af |
|
MD5 | d1be9731f8ad9eae4e5001c7acd878b3 |
|
BLAKE2b-256 | b5e6fe7f07de6f3c659733ad7622a97c62b809900f5225f6f5b2792f15ec75d8 |
Hashes for finbourne_identity_sdk-2.1.30-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e44c0a6c3a5c205d58f9f2666a0bf864de01d8d48f7c961ae990496a9425c89 |
|
MD5 | 27795606be5646d340cb47c7fed718ca |
|
BLAKE2b-256 | 3848a9c969758b19ba730a30e9137954f5066e099c2a2f316278e649501a22d6 |