|
| 1 | +============================================== |
| 2 | +WebService - Client Certificate Authentication |
| 3 | +============================================== |
| 4 | + |
| 5 | +.. |
| 6 | + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 7 | + !! This file is generated by oca-gen-addon-readme !! |
| 8 | + !! changes will be overwritten. !! |
| 9 | + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 10 | + !! source digest: sha256:4a2f96ce5a7f3c69babb934fd5a9e2bb530fd01e335c3526d5f499774b59fd36 |
| 11 | + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 12 | +
|
| 13 | +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png |
| 14 | + :target: https://odoo-community.org/page/development-status |
| 15 | + :alt: Beta |
| 16 | +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png |
| 17 | + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html |
| 18 | + :alt: License: AGPL-3 |
| 19 | +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb--api-lightgray.png?logo=github |
| 20 | + :target: https://github.com/OCA/web-api/tree/18.0/webservice_client_certificate_auth |
| 21 | + :alt: OCA/web-api |
| 22 | +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png |
| 23 | + :target: https://translation.odoo-community.org/projects/web-api-18-0/web-api-18-0-webservice_client_certificate_auth |
| 24 | + :alt: Translate me on Weblate |
| 25 | +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png |
| 26 | + :target: https://runboat.odoo-community.org/builds?repo=OCA/web-api&target_branch=18.0 |
| 27 | + :alt: Try me on Runboat |
| 28 | + |
| 29 | +|badge1| |badge2| |badge3| |badge4| |badge5| |
| 30 | + |
| 31 | +Adds support for Client Side Certificates to the ``webservice`` module. |
| 32 | + |
| 33 | +**Table of contents** |
| 34 | + |
| 35 | +.. contents:: |
| 36 | + :local: |
| 37 | + |
| 38 | +Configuration |
| 39 | +============= |
| 40 | + |
| 41 | +Certificate paths are configured via ``server_environment``. Add the |
| 42 | +configuration section matching your backend's ``tech_name`` to your |
| 43 | +server environment files: |
| 44 | + |
| 45 | +:: |
| 46 | + |
| 47 | + [webservice_backend.my_secure_service] |
| 48 | + auth_type = client_certificate |
| 49 | + client_certificate_path = /etc/odoo/certs/client.crt |
| 50 | + # Optional: Leave empty if the private key is bundled in the certificate file |
| 51 | + client_private_key_path = /etc/odoo/certs/client.key |
| 52 | + |
| 53 | +Usage |
| 54 | +===== |
| 55 | + |
| 56 | +When a call is made using the backend, the adapter automatically injects |
| 57 | +the ``cert`` parameter into the underlying Python ``requests`` call |
| 58 | +based on the provided configuration: |
| 59 | + |
| 60 | +- **Certificate only:** Passed as ``cert='/path/to/file'`` (a single |
| 61 | + file containing the private key and the certificate). |
| 62 | +- **Certificate and Key:** Passed as a tuple |
| 63 | + ``cert=('/path/to/crt', '/path/to/key')``. |
| 64 | + |
| 65 | +Warning: the private key to your local certificate must be unencrypted. |
| 66 | +Currently, ``requests`` does not support using encrypted keys. |
| 67 | + |
| 68 | +See `Requests: Client Side |
| 69 | +Certificates <https://requests.readthedocs.io/en/latest/user/advanced/#client-side-certificates>`__ |
| 70 | +for underlying implementation details. |
| 71 | + |
| 72 | +Bug Tracker |
| 73 | +=========== |
| 74 | + |
| 75 | +Bugs are tracked on `GitHub Issues <https://github.com/OCA/web-api/issues>`_. |
| 76 | +In case of trouble, please check there if your issue has already been reported. |
| 77 | +If you spotted it first, help us to smash it by providing a detailed and welcomed |
| 78 | +`feedback <https://github.com/OCA/web-api/issues/new?body=module:%20webservice_client_certificate_auth%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. |
| 79 | + |
| 80 | +Do not contact contributors directly about support or help with technical issues. |
| 81 | + |
| 82 | +Credits |
| 83 | +======= |
| 84 | + |
| 85 | +Authors |
| 86 | +------- |
| 87 | + |
| 88 | +* Camptocamp |
| 89 | + |
| 90 | +Contributors |
| 91 | +------------ |
| 92 | + |
| 93 | +- Vincent Van Rossem <vincent.vanrossem@camptocamp.com> |
| 94 | + |
| 95 | +Maintainers |
| 96 | +----------- |
| 97 | + |
| 98 | +This module is maintained by the OCA. |
| 99 | + |
| 100 | +.. image:: https://odoo-community.org/logo.png |
| 101 | + :alt: Odoo Community Association |
| 102 | + :target: https://odoo-community.org |
| 103 | + |
| 104 | +OCA, or the Odoo Community Association, is a nonprofit organization whose |
| 105 | +mission is to support the collaborative development of Odoo features and |
| 106 | +promote its widespread use. |
| 107 | + |
| 108 | +This module is part of the `OCA/web-api <https://github.com/OCA/web-api/tree/18.0/webservice_client_certificate_auth>`_ project on GitHub. |
| 109 | + |
| 110 | +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
0 commit comments