-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
60 changed files
with
2,246 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
0.0.x (TBD) | ||
----------- | ||
* Documentation on https://open-producten.readthedocs.io/ | ||
|
||
0.0.2 (17-01-2025) | ||
------------------ | ||
|
||
0.0.1 (02-01-2025) | ||
------------------ | ||
|
||
🎉 First release of Open Producten. | ||
|
||
Features: | ||
|
||
* Producttype API | ||
* Vragen API | ||
* Prijzen API | ||
* Themas API | ||
* Links API | ||
* Bestanden API | ||
* Automated test suite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
.. _security: | ||
|
||
Open Producten's security policies | ||
================================== | ||
|
||
Open Producten's development team is strongly committed to responsible reporting | ||
and disclosure of security-related issues. As such, we’ve adopted and follow a | ||
set of policies which conform to that ideal and are geared toward allowing us to | ||
deliver timely security updates to the official distribution of Open Producten. | ||
|
||
Reporting security issues | ||
------------------------- | ||
|
||
**Short version: please report security issues by emailing [email protected].** | ||
|
||
If you discover security issues in Open Producten or related projects under the same | ||
organization, we request you to disclose these in a *responsible* way by e-mailing to | ||
[email protected]. | ||
|
||
It is extremely useful if you have a reproducible test case and/or clear steps on how to | ||
reproduce the vulnerability. | ||
|
||
Please do not report security issues on the public Github issue tracker, as this makes | ||
it visible which exploits exist before a fix is available, potentially comprising a lot | ||
of unprotected instances. | ||
|
||
Once you’ve submitted an issue via email, you should receive an acknowledgment from a | ||
member of the security team as soon as possible, and depending on the action to be taken, | ||
you may receive further followup emails. | ||
|
||
Timeline of the process | ||
----------------------- | ||
|
||
Open Producten has a technical steering group, of which all members are involved in the | ||
handling of security issues. | ||
|
||
1. The recipients of the report first validate if there is indeed a (possible) issue. | ||
|
||
2. After validation, we confirm that we received the report and if it is indeed a valid issue. | ||
|
||
3. We have a private Github repository accessible to the technical steering group. In this | ||
repository, an issue is created for the vulnerability where the impact and possible | ||
solutions are discussed. | ||
|
||
4. The next step is to create a (draft) Github security advisory, which is only visible | ||
to the repository administrators and technical steering group. Severity and impact | ||
will be established here. | ||
|
||
5. If appropriate, we request a `CVE identifier`_ from Github. | ||
|
||
6. A patch is implemented, reviewed and tested in a private fork. | ||
|
||
7. During the patch development process, known service providers are contacted to | ||
inform them of the vulnerability and coordinate the release date and rollout of the | ||
fix. Service providers should subscribe to the release early notice list. | ||
|
||
8. When the fix is tested and release coordination is done, the fix is merged into the | ||
primary repository. The security advisory and release are published. Service providers | ||
update their managed instances. | ||
|
||
9. The release and security vulnerability are communicated to the community. This | ||
includes announcements on the Common Ground Slack and on `commonground.nl`_. | ||
|
||
|
||
.. _CVE identifier: https://cve.mitre.org/cve/identifiers/ | ||
.. _commonground.nl: https://commonground.nl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line, and also | ||
# from the environment for the first two. | ||
SPHINXOPTS ?= | ||
SPHINXBUILD ?= sphinx-build | ||
SOURCEDIR = . | ||
BUILDDIR = _build | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
.. _api_index: | ||
|
||
================== | ||
API-specifications | ||
================== | ||
|
||
.. TODO: standard date | ||
Open Producten provides two API, one for **Product**'s and one for **Producttype**'s. | ||
Both of these API's are to be a recommended standard as of ..... The | ||
specifications can be found below. | ||
|
||
====================== ========================================== | ||
API Specification version(s) | ||
====================== ========================================== | ||
Product API `0.0.2 <https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/maykinmedia/open-producten/v0.0.2/src/producten-openapi.yaml>`__ | ||
Producttype API `0.0.2 <https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/maykinmedia/open-producten/v0.0.2/src/producttypen-openapi.yaml>`__ | ||
====================== ========================================== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import subprocess | ||
|
||
|
||
def test_linkcheck(tmpdir): | ||
doctrees = tmpdir.join("doctrees") | ||
htmldir = tmpdir.join("html") | ||
subprocess.check_call( | ||
["sphinx-build", "-W", "-blinkcheck", "-d", str(doctrees), ".", str(htmldir)], | ||
) | ||
|
||
|
||
def test_build_docs(tmpdir): | ||
doctrees = tmpdir.join("doctrees") | ||
htmldir = tmpdir.join("html") | ||
subprocess.check_call( | ||
["sphinx-build", "-W", "-bhtml", "-d", str(doctrees), ".", str(htmldir)], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
.. _client-development-auth: | ||
|
||
Authentication and authorization | ||
================================ | ||
|
||
Open Producten uses the described authentication and authorization mechanism based on | ||
API tokens. It does not implement its own mechanism but uses `TokenAuthentication`_ | ||
provided by `Django REST Framework`_. | ||
|
||
To connect to Open Producten, you have received a token key which should be included | ||
in your request's HTTP headers: | ||
|
||
.. code-block:: none | ||
Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b | ||
.. _TokenAuthentication: https://www.django-rest-framework.org/api-guide/authentication/#tokenauthentication | ||
.. _Django REST Framework: https://www.django-rest-framework.org/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
.. _client-development-cors: | ||
|
||
Cross-Origin Resource Sharing (CORS) | ||
==================================== | ||
|
||
Some clients develop against Open Producten using single-page-application technology that | ||
runs completely in the browser, such as React, Angular or other frameworks. | ||
|
||
Open Producten must be deployed with an appropriate CORS-configuration for this. | ||
|
||
.. note:: We always recommend using an API gateway/own backend to communicate with Open | ||
Zaak. It's simpler because you don't have to deal with CORS, and there's less risk | ||
of credentials/secrets leaking. You should **never** store client ID/secret in your | ||
dist bundle(s). | ||
|
||
Production-grade settings | ||
------------------------- | ||
|
||
In production-like environments, we recommend using an explicit allow-list for the | ||
trusted origins. This requires deploying Open Producten with | ||
``CORS_ALLOWED_ORIGINS=https://my-app.example.com``, where ``https://my-app.example.com`` | ||
is the domain where the application is deployed. | ||
|
||
Development/experimental configuration | ||
-------------------------------------- | ||
|
||
If you're running Open Producten locally or on an environment with dummy data for | ||
development purposes, you can grant CORS access to every possible client using | ||
``CORS_ALLOW_ALL_ORIGINS=True`` in the Open Producten deployment. | ||
|
||
Separation of administrative interface and API | ||
---------------------------------------------- | ||
|
||
The administrative interface authenticates using session cookies, while the APIs use | ||
the ``Authorization`` header with tokens. | ||
|
||
The session cookies are never sent on cross-domain requests, and the CORS configuration | ||
is configured to not allow credentials (which are typically session cookies). The API | ||
with the ``Authorization`` header is not affected by this policy. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
.. _client-development: | ||
|
||
Open Producten client documentation | ||
============================== | ||
|
||
Open Producten is primarily a provider of API's to be consumed by clients. If you're | ||
developing such a client (or consumer), you're in the right place! | ||
|
||
Please select your relevant topic | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
|
||
authentication | ||
cors | ||
recipes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
.. _client-development-recipes: | ||
|
||
Recipes | ||
======= | ||
|
||
In the recipes documentation, we aim to describe some patterns to organize your API | ||
calls to maximize performance. | ||
|
||
If you can give the equivalent example in your own language-of-preference, please | ||
submit a pull request! | ||
|
||
|
||
.. TODO: include common patterns of how Open Producten will be used |
Oops, something went wrong.