Skip to main content

FINBOURNE Access Management API

Project description

finbourne-access-sdk

FINBOURNE Technology

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 0.0.3758
  • Package version: 2.0.130
  • 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-access-sdk-python.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/finbourne/finbourne-access-sdk-python.git)

Then import the package:

import finbourne_access

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_access

Tests

Execute pytest to run the tests.

Getting Started

You'll need to provide some configuration to connect to the finbourne_access 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_ACCESS_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_ACCESS_API_URL,
FBN_ACCESS_TOKEN

You can send your requests to finbourne_access 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_accessUrl":"<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_accessUrl":"<FINBOURNE-application-url>",
        "accessToken":"<your-access-token>"
    }
}

You can send your requests to finbourne_access 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_accessUrl":"<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_access
from finbourne_access.exceptions import ApiException
from pprint import pprint

import os
from finbourne_access import (
    ApiClientFactory,
    ApplicationMetadataApi,
    EnvironmentVariablesConfigurationLoader,
    SecretsFileConfigurationLoader,
    ArgsConfigurationLoader
)

# Use the finbourne_access 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/access"
# 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/access

Class Method HTTP request Description
ApplicationMetadataApi list_access_controlled_resources GET /api/metadata/access/resources [EARLY ACCESS] ListAccessControlledResources: Get resources available for access control
PoliciesApi add_to_policy_collection POST /api/policycollections/{code}/add [EARLY ACCESS] AddToPolicyCollection: Add To PolicyCollection
PoliciesApi create_policy POST /api/policies [EARLY ACCESS] CreatePolicy: Create Policy
PoliciesApi create_policy_collection POST /api/policycollections [EARLY ACCESS] CreatePolicyCollection: Create PolicyCollection
PoliciesApi delete_policy DELETE /api/policies/{code} [EARLY ACCESS] DeletePolicy: Delete Policy
PoliciesApi delete_policy_collection DELETE /api/policycollections/{code} [EARLY ACCESS] DeletePolicyCollection: Delete PolicyCollection
PoliciesApi evaluate POST /api/me [EARLY ACCESS] Evaluate: Run one or more evaluations
PoliciesApi get_own_policies GET /api/me GetOwnPolicies: Get policies of requesting user
PoliciesApi get_policy GET /api/policies/{code} [EARLY ACCESS] GetPolicy: Get Policy
PoliciesApi get_policy_collection GET /api/policycollections/{code} [EARLY ACCESS] GetPolicyCollection: Get PolicyCollection
PoliciesApi list_policies GET /api/policies [EARLY ACCESS] ListPolicies: List Policies
PoliciesApi list_policy_collections GET /api/policycollections [EARLY ACCESS] ListPolicyCollections: List PolicyCollections
PoliciesApi page_policies GET /api/policies/page [EARLY ACCESS] PagePolicies: Page Policies
PoliciesApi page_policy_collections GET /api/policycollections/page [EARLY ACCESS] PagePolicyCollections: Page PolicyCollections
PoliciesApi remove_from_policy_collection POST /api/policycollections/{code}/remove [EARLY ACCESS] RemoveFromPolicyCollection: Remove From PolicyCollection
PoliciesApi update_policy PUT /api/policies/{code} [EARLY ACCESS] UpdatePolicy: Update Policy
PoliciesApi update_policy_collection PUT /api/policycollections/{code} [EARLY ACCESS] UpdatePolicyCollection: Update PolicyCollection
PolicyTemplatesApi create_policy_template POST /api/policytemplates [EXPERIMENTAL] CreatePolicyTemplate: Create a Policy Template
PolicyTemplatesApi delete_policy_template DELETE /api/policytemplates/{code} [EXPERIMENTAL] DeletePolicyTemplate: Deleting a policy template
PolicyTemplatesApi generate_policy_from_template POST /api/policytemplates/$generatepolicy [EXPERIMENTAL] GeneratePolicyFromTemplate: Generate policy from template
PolicyTemplatesApi get_policy_template GET /api/policytemplates/{code} [EXPERIMENTAL] GetPolicyTemplate: Retrieving one Policy Template
PolicyTemplatesApi list_policy_templates GET /api/policytemplates [EXPERIMENTAL] ListPolicyTemplates: List Policy Templates
PolicyTemplatesApi update_policy_template PUT /api/policytemplates/{code} [EXPERIMENTAL] UpdatePolicyTemplate: Update a Policy Template
RolesApi add_policy_collection_to_role POST /api/roles/{scope}/{code}/policycollections [EARLY ACCESS] AddPolicyCollectionToRole: Add policy collections to a role
RolesApi create_role POST /api/roles [EARLY ACCESS] CreateRole: Create Role
RolesApi delete_role DELETE /api/roles/{code} [EARLY ACCESS] DeleteRole: Delete Role
RolesApi get_role GET /api/roles/{code} [EARLY ACCESS] GetRole: Get Role
RolesApi list_roles GET /api/roles [EARLY ACCESS] ListRoles: List Roles
RolesApi remove_policy_collection_from_role DELETE /api/roles/{scope}/{code}/policycollections/{policycollectionscope}/{policycollectioncode} [EARLY ACCESS] RemovePolicyCollectionFromRole: Remove policy collection from role
RolesApi update_role PUT /api/roles/{code} [EARLY ACCESS] UpdateRole: Update Role
UserRolesApi add_policy_collection_to_user_role POST /api/userroles/{userid}/policycollections [EXPERIMENTAL] AddPolicyCollectionToUserRole: Add a policy collection to a user-role
UserRolesApi add_policy_to_user_role POST /api/userroles/{userid}/policies [EXPERIMENTAL] AddPolicyToUserRole: Add a policy to a user-role
UserRolesApi create_user_role POST /api/userroles [EXPERIMENTAL] CreateUserRole: Create a user-role
UserRolesApi delete_user_role DELETE /api/userroles/{userid} [EXPERIMENTAL] DeleteUserRole: Delete a user-role
UserRolesApi get_user_role GET /api/userroles/{userid} [EXPERIMENTAL] GetUserRole: Get a user-role
UserRolesApi list_user_roles GET /api/userroles [EXPERIMENTAL] ListUserRoles: List user-roles
UserRolesApi remove_policy_collection_from_user_role DELETE /api/userroles/{userid}/policycollections/{policyCollectionScope}/{policyCollectionCode} [EXPERIMENTAL] RemovePolicyCollectionFromUserRole: Remove a policy collection from a user-role
UserRolesApi remove_policy_from_user_role DELETE /api/userroles/{userid}/policies/{policyScope}/{policyCode} [EXPERIMENTAL] RemovePolicyFromUserRole: Remove a policy from a user-role
UserRolesApi update_user_role POST /api/userroles/{userid}/update [EXPERIMENTAL] UpdateUserRole: Update a user-role

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

oauth2

Author

info@finbourne.com

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

finbourne_access_sdk-2.0.130.tar.gz (82.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

finbourne_access_sdk-2.0.130-py3-none-any.whl (171.3 kB view details)

Uploaded Python 3

File details

Details for the file finbourne_access_sdk-2.0.130.tar.gz.

File metadata

  • Download URL: finbourne_access_sdk-2.0.130.tar.gz
  • Upload date:
  • Size: 82.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.8.2 Linux/5.15.106-flatcar

File hashes

Hashes for finbourne_access_sdk-2.0.130.tar.gz
Algorithm Hash digest
SHA256 909675fb76bb12bca76f0e0df2f18e13319e55813c6dbf4afbee8ec3f4f13616
MD5 015d6a97e9c79e91531832b5f184da62
BLAKE2b-256 6b214607df7802b0b012a129cfc15195e00ec22d0864e9ad0b88e6d61d6343ef

See more details on using hashes here.

File details

Details for the file finbourne_access_sdk-2.0.130-py3-none-any.whl.

File metadata

File hashes

Hashes for finbourne_access_sdk-2.0.130-py3-none-any.whl
Algorithm Hash digest
SHA256 b88ae107e613d01850118574b1f816c6bb41edff05b05cc4c04faba72d012743
MD5 caf62d7b888ac1fe9b1a0805632a55d7
BLAKE2b-256 1d275e2a262639bead33b82dee1c7dfd71c8540580130b3d4f07941082944d65

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page