Skip to main content

conan-auth-source-plugin

A Conan authentication source plugin, implemented as a python module. Conan supports both a remote and a source authentication, where the remotes are used for interacting with a remote for packages, whereas the source is used for getting source using the get() or download() method in a conanfile.py.

Installation

Install the conan authentication source Python module, then install the plugin in that module into the conan installation.

python -m pip install conan-auth-source-plugin
conan-auth-source-plugin-install

Configuration

This plugin uses the source_creditials.json file for configuration. This file is marked as experimental at this stage. This module further experiments and extends its usage.

Note: The conan source configuration code uses a first match (begins with) strategy with URLs. Thus, it is important to order the credentials in longest url first if there is any overlap in matching the URL being fetched with the configuration.

Sample

{
  "credentials": [
    {
      "url": "https://github.com/...",
      "type": "github.app",
      "app_id": "4459267",
      "app_installation_id": "150620648",
      "app_private_key" : "-----BEGIN RSA PRIVATE KEY-----\n...\n-----END RSA PRIVATE KEY-----"
    }
  ]
}

Create App

The following procedure can be used to create an application in github. This procedure requires an organisation owner, or a team member with app management permissions.

This procedure is documented as a GitHub app that act on their own behalf. This requires an installation access token for authentication.

  1. Go to the organisation (or user) settings

    https://github.com/organizations/conan-py/settings/apps https://github.com//conan-py/settings/apps

  2. App settings

  • provide a github app name
  • write a description
  • add a homepage URL (e.g. to the organisation landing page), even though it isn't explicitly used
  • disable web hook
  • add repository permission 'Contents', set to 'Read-Only'
  1. Once the app is created, the 'App ID' and the 'Client ID' (not used for this workflow) are known

  2. Go to the bottom of the application and generate a private key. This will generate a 2048bit RSA key pair without a pass phrase.

  3. On the side bar of the application, select the "Install App" menu item. Once installed the installation id can be taken from the installation URL. For example if the installation URL is 'https://github.com/organizations/conan-py/settings/installations/150620648', then the installation id is 150620648. The installation id is not displayed in the web UI of github.

Why use this plugin module

This module is a shift-left style strategy for authentication. Instead of using this plugin a build pipeline (or any Conan build) can pre-authenticate with all github organisation/repositores that may be needed during a build.

This module goes half-way towards "authentication on demand". This is a concept where http authentication is only attempted by a client if a 401 (Not authenticated) response is received, and the WWW-Authenticate header provides authentication schemes that are semantically understood by the client. Once authenticated the client should reissue the http request with the new credentials.

Residual: This plugin does not defer authentication until after it is needed. This is not supported by the Conan client.

Known issues

  • this implementation stores private keys by value in memory. e.g. if using AWS it would be better to use a HSM or AWS KMS, but this would require an implementation of the github.Auth.Auth class. Using AWS Secrets Manager at least stores the key more securely at rest, even though it will be stored in memory non-securely.

  • when using the get() method in a conanfile.py, provide a filename parameter with a representative name (e.g. 'archive.tgz') so that conan can write the download to disk. The filename should be expressed in the conandata.yml.

Development

To install the plugin in a local Conan environment, the whole of the plugin repository can be installed, as the .conanignore will exclude everything except the plugin python file that thunks to the module.

conan config install .

Install the plugin Python for development as an editable module. From the root of the repository/project:

pip install --editable .

Links

pygithub

Appendices

github tarball URLs

For getting source from a private github repo, use a URL/http request of the form:

GET https://api.github.com/repos/{owner}/{repo}/tarball/{ref}
Authorization: Bearer <installation_token>

Metadata

Release files for conan-auth-source-plugin 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for conan-auth-source-plugin 0.1.1
File Size Uploaded Provenance Actions
conan_auth_source_plugin-0.1.1.tar.gz 18.1 kB With provenance Details for conan_auth_source_plugin-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for conan-auth-source-plugin 0.1.1
File Interpreter ABI Platform Actions
conan_auth_source_plugin-0.1.1-py3-none-any.whl Python 3 none any Details for conan_auth_source_plugin-0.1.1-py3-none-any.whl

Total release size: 29.0 kB

Release files / conan_auth_source_plugin-0.1.1.tar.gz

Download URL conan_auth_source_plugin-0.1.1.tar.gz
Size 18.1 kB
Tags Source
SHA-256 checksum
How to use checksums
bce0e7731c50344d0f0d4da8525003c9ef902fe2cf1da7ac200ceeb87278045b
BLAKE2b-256 checksum
How to use checksums
84d130ffca3d54883033b0d55615aed3d9b4ef73f6730fbd57aad2d9f70408bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 2, 2026.

Transparency log

Release files / conan_auth_source_plugin-0.1.1-py3-none-any.whl

Download URL conan_auth_source_plugin-0.1.1-py3-none-any.whl
Size 10.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8027d57d9405268c4a7e31831744e6b2c99ad9470c586e0af4f21994675d5f77
BLAKE2b-256 checksum
How to use checksums
213cf6d04efa9bcc3543541f09de49cc7872b954bd8fa2ee822f06e8ee195561
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 2, 2026.

Transparency log

Security for conan-auth-source-plugin 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for conan_auth_source_plugin-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 2, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page