Skip to content

Commit 853fc3d

Browse files
authored
Merge pull request #32 from nexB/31-integration-docs
Improve documentation for integrations setup #31
2 parents a633e2f + f6b5a57 commit 853fc3d

File tree

4 files changed

+206
-112
lines changed

4 files changed

+206
-112
lines changed

docs/application-settings.rst

Lines changed: 73 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -63,34 +63,6 @@ responsible to provide your own validation of the Host header.
6363
6464
ALLOWED_HOSTS=*
6565
66-
.. _dejacode_settings_purldb:
67-
68-
PURLDB
69-
------
70-
71-
Provide the URL and API key of your `PurlDB <https://github.com/nexB/purldb/>`_
72-
instance.
73-
74-
::
75-
76-
PURLDB_URL=https://your-purldb-domain/
77-
PURLDB_API_KEY=apikeyexample
78-
79-
.. _dejacode_settings_vulnerablecode:
80-
81-
VULNERABLECODE
82-
--------------
83-
84-
You can either run your own instance of
85-
`VulnerableCode <https://github.com/nexB/vulnerablecode/>`_
86-
or connect to the public one.
87-
88-
Authentication is provided using an API key that you can obtain by registering at
89-
https://public.vulnerablecode.io/account/request_api_key/ ::
90-
91-
VULNERABLECODE_URL=https://public.vulnerablecode.io/
92-
VULNERABLECODE_API_KEY=apikeyexample
93-
9466
EMAIL
9567
-----
9668

@@ -187,11 +159,11 @@ to provide some progress about pipeline run execution.
187159

188160
Default: ``INFO``
189161

190-
The ``DEBUG`` value can be provided to this setting to see all ScanCode.io debug
162+
The ``DEBUG`` value can be provided to this setting to see all DejaCode debug
191163
messages to help track down configuration issues for example.
192164
This mode can be enabled globally through the ``.env`` file::
193165

194-
SCANCODEIO_LOG_LEVEL=DEBUG
166+
DEJACODE_LOG_LEVEL=DEBUG
195167

196168
.. _clamd-settings:
197169

@@ -222,6 +194,77 @@ default the ``US/Pacific`` time zone is used::
222194
You can view a detailed list of time zones `here.
223195
<https://en.wikipedia.org/wiki/List_of_tz_database_time_zones>`_
224196

197+
.. _dejacode_settings_aboutcode_integrations:
198+
199+
AboutCode integrations
200+
======================
201+
202+
To **integrate DejaCode with other applications within the AboutCode stack**,
203+
you have the flexibility to configure and set up integrations using the following
204+
application settings.
205+
206+
It's important to understand that employing application settings will make these
207+
integrations **globally accessible across all Dataspaces** within your DejaCode
208+
instance.
209+
210+
Alternatively, if you wish to tailor the availability of these features to a specific
211+
Dataspace, you can define and set those values directly within the :ref:`dataspace`
212+
configuration. This can be done through the Dataspace admin UI, allowing you to scope
213+
the availability of these integrations exclusively to the designated Dataspace.
214+
215+
.. _dejacode_settings_scancodeio:
216+
217+
SCANCODEIO
218+
----------
219+
220+
Provide the URL and API key of your `ScanCode.io <https://github.com/nexB/scancode.io>`_
221+
instance.
222+
223+
.. code-block:: python
224+
225+
SCANCODEIO_URL=https://your_scancodeio.url/
226+
SCANCODEIO_API_KEY=insert_your_api_key_here
227+
228+
.. note::
229+
You have the option to define and set those settings directly on your Dataspace.
230+
For detailed instructions, refer to :ref:`dejacode_dataspace_scancodeio`.
231+
232+
.. _dejacode_settings_purldb:
233+
234+
PURLDB
235+
------
236+
237+
Provide the URL and API key of your `PurlDB <https://github.com/nexB/purldb>`_ instance.
238+
239+
.. code-block:: python
240+
241+
PURLDB_URL=https://your-purldb.url/
242+
PURLDB_API_KEY=insert_your_api_key_here
243+
244+
.. note::
245+
You have the option to define and set those settings directly on your Dataspace.
246+
For detailed instructions, refer to :ref:`dejacode_dataspace_purldb`.
247+
248+
.. _dejacode_settings_vulnerablecode:
249+
250+
VULNERABLECODE
251+
--------------
252+
253+
You can either run your own instance of
254+
`VulnerableCode <https://github.com/nexB/vulnerablecode>`_
255+
or connect to the public one https://public.vulnerablecode.io/.
256+
257+
.. note:: Providing an API key is optional when using the public VulnerableCode instance.
258+
259+
.. code-block:: python
260+
261+
VULNERABLECODE_URL=https://public.vulnerablecode.io/
262+
VULNERABLECODE_API_KEY=insert_your_api_key_here
263+
264+
.. note::
265+
You have the option to define and set those settings directly on your Dataspace.
266+
For detailed instructions, refer to :ref:`dejacode_dataspace_vulnerablecode`.
267+
225268
LDAP Integration
226269
================
227270

docs/dataspace.rst

Lines changed: 92 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,39 @@
1+
.. _dataspace:
2+
13
=========
24
Dataspace
35
=========
46

7+
The Dataspace serves as a pivotal mechanism within DejaCode, facilitating the
8+
segregation of data for each organization while maintaining a unified storage
9+
structure in the same database, schema, or table.
10+
Within a given installation, multiple "Dataspace" organizations can be defined,
11+
but there exists only one reference.
12+
13+
This concept is a crucial element employed across DejaCode to effectively separate
14+
**reference data provided by nexB** from the data utilized in a specific DJE
15+
installation.
16+
Essentially, it introduces the notion of a "tenant" within a DJE installation,
17+
enabling the isolation of organization-specific and/or private records.
18+
This segregation supports both multi-tenancy and the coexistence of nexB-provided
19+
reference data and organization-specific or customized data.
20+
21+
The key purposes of this separation include:
22+
23+
1. **Orderly and Simplified Data Updates**: Facilitates smooth and streamlined updates
24+
from nexB reference data, ensuring efficient data synchronization and exchange
25+
across Dataspaces.
26+
2. **Dataspace-Specific Customizations**: Allows for customization of Dataspace-specific
27+
data, such as configurations for license tags or specific preferences, tailoring
28+
the installation to the unique needs of each organization.
29+
3. **Support for Multi-Tenancy**: Enables the sharing of the same DJE instance among
30+
different organizations, each operating within its distinct Dataspace,
31+
promoting multi-tenancy while maintaining data segregation.
32+
33+
In summary, the Dataspace concept in DejaCode plays a pivotal role in maintaining data
34+
integrity, enabling efficient updates, accommodating customization, and supporting
35+
multi-tenancy for a diverse range of organizations within a DJE installation.
36+
537
Setting up your License Library
638
===============================
739

@@ -121,7 +153,7 @@ you do not need.
121153
Assigning Usage Policies to licenses
122154
====================================
123155

124-
There are more than **1,300 Licenses** in your License list from Reference Data, so
156+
There are more than **2,000 Licenses** in your License list from Reference Data, so
125157
you will want to develop a strategy that works for your business requirements to
126158
assign Usage Policies efficiently. The two basic techniques are:
127159

@@ -130,7 +162,7 @@ assign Usage Policies efficiently. The two basic techniques are:
130162
2. Mass update: Select a group of licenses on the **Browse License** form and use Mass
131163
Update to assign a Usage Policy to that group of licenses.
132164

133-
As an example of the first technique, locate and select the license with the Key
165+
As an example of the first technique, locate and select the license with the key
134166
of **apache-2.0** in your list. Your organization probably already has a policy
135167
regarding this very common license; you may simply allow engineering to use
136168
components under that license or you may require additional review of how they
@@ -278,6 +310,8 @@ The basic techniques to use in your own Dataspace are:
278310
**Set usage policy from licenses** option in the dropdown list in the lower
279311
right hand corner of the form and follow the prompts to complete that action.
280312

313+
.. _dejacode_dataspace_scancodeio:
314+
281315
Enable package scanning with your ScanCode.io server
282316
====================================================
283317

@@ -295,9 +329,16 @@ You can:
295329
* Download the scan results to a JSON-formatted file to integrate with other
296330
analysis and reporting tools.
297331

332+
Install and configure ScanCode.io
333+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
334+
298335
.. warning::
299-
The ScanCode.io server **should not be installed on the same server** (virtual or
300-
physical) as the DejaCode one.
336+
If you plan to run ScanCode.io **on the same server** (virtual or physical) as
337+
the DejaCode instance, **ensure that the host machine has sufficient resources**
338+
to handle both applications.
339+
Also, you will have to provide custom network ports for the ScanCode.io application
340+
as the ports 80 and 443 will be already used by the DejaCode application.
341+
See https://scancodeio.readthedocs.io/en/latest/installation.html#use-alternative-http-ports
301342

302343
1. Install a ScanCode.io server following instructions at
303344
https://scancodeio.readthedocs.io/en/latest/installation.html
@@ -321,29 +362,21 @@ You can:
321362
DejaCode instance:
322363
https://scancodeio.readthedocs.io/en/latest/command-line-interface.html#scanpipe-create-user-username
323364

324-
4. Set the ScanCode.io server URL and the API key in your local DejaCode settings file
325-
``.env``.
326-
327-
.. code-block:: python
328-
329-
SCANCODEIO_URL=https://<your_scancodeio.url>/
330-
SCANCODEIO_API_KEY=<api_key>
331-
332-
**Restarting the services is required following any changes to .env:**
365+
4. Set the ScanCode.io Server URL and API key in your Dataspace Configuration:
333366

334-
.. code-block:: bash
335-
336-
docker compose restart web worker
337-
338-
5. Enable package scanning on your Dataspace from the **Administration dashboard**.
339-
340-
Select **Dataspaces** and open your Dataspace definition.
341-
In the **Application Process Settings** section, check the
342-
**Enable package scanning** option and save.
367+
- Access your DejaCode web application **Administration dashboard**.
368+
- Navigate to the **Dataspaces** section and select your Dataspace name.
369+
- Within the **Application Process Settings** section, enable the
370+
**Enable package scanning** option.
371+
- Update the values for the **ScanCode.io URL** and **ScanCode.io API key** fields
372+
located in the **Configuration** panel at the bottom of the form.
373+
- Click the **Save** button.
343374

344375
You can now access the **Scans** section from the **Tools** menu and request package
345376
scans from this view.
346377

378+
.. _dejacode_dataspace_purldb:
379+
347380
Enable PurlDB service
348381
=====================
349382

@@ -359,47 +392,44 @@ and perform an asynchronous query of the PurlDB to find relevant data.
359392

360393
You can:
361394

362-
* Browse and search from a list of over **14 millions Packages**.
395+
* Browse and search from a list of over **21 millions Packages**.
363396
* Get extra information on your local Packages from the **"PurlDB" tab**.
364-
* Create local Packages automatically from entries found in the PurlDB.
397+
* **Create local Packages automatically** from entries found in the PurlDB.
365398
* Enhance the **Global search** results with Packages from the PurlDB.
366399
* Check for **new Package versions** from your Products inventory
367400

368-
1. Get in touch with nexB to request your credentials for the **PurlDB** service.
369-
370-
2. Set those credentials in your local DejaCode configuration file ``.env``.
371-
372-
See :doc:`/application-settings` for more details on the configuration system.
401+
PurlDB service
402+
^^^^^^^^^^^^^^
373403

374-
.. code-block:: python
404+
A public instance of **PurlDB** is available at
405+
https://public.purldb.io/api/packages/
375406

376-
PURLDB_URL=https://purldb.url/
377-
PURLDB_USER=PROVIDED_BY_NEXB
378-
PURLDB_PASSWORD=PROVIDED_BY_NEXB
407+
Alternatively, you have the option to run your instance of PurlDB by
408+
following the documentation provided at https://purldb.readthedocs.io/
379409

410+
Set the PurlDB Server URL and API key in your Dataspace Configuration
411+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
380412

381-
**Restarting the services is required following any changes to .env:**
382-
383-
.. code-block:: bash
384-
385-
docker compose restart web worker
386-
387-
3. Enable **PurlDB access** on your Dataspace from the **Administration dashboard**.
388-
389-
Select **Dataspaces** and open your Dataspace definition.
390-
In the **Application Process Settings** section, check the **Enable PurlDB access**
391-
option and save.
413+
- Access your DejaCode web application **Administration dashboard**.
414+
- Navigate to the **Dataspaces** section and select your Dataspace name.
415+
- Within the **Application Process Settings** section, enable the
416+
**Enable PurlDB access** option.
417+
- Update the values for the **PurlDB URL** and **PurlDB API key** fields
418+
located in the **Configuration** panel at the bottom of the form.
419+
- Click the **Save** button.
392420

393421
You can now access the **PurlDB** section from the **Tools** menu and browse package
394422
from this view.
395423

424+
.. _dejacode_dataspace_vulnerablecode:
425+
396426
Enable VulnerableCodeDB service
397427
===============================
398428

399429
DejaCode integration with the **VulnerableCodeDB** service authorizes DejaCode to access
400-
the VulnerableCodeDB using a Package URL (purl) to determine if there are any reported
401-
vulnerabilities for a specific Package and return the Vulnerability ID and related URLs
402-
to a Vulnerabilities tab in the Package details user view.
430+
the VulnerableCodeDB using a Package URL (purl) to determine if there are any
431+
**reported vulnerabilities for a specific Package** and return the Vulnerability ID
432+
and related URLs to a **Vulnerabilities tab** in the **Package details** user view.
403433

404434
DejaCode displays a Vulnerability icon next to the Package identifier in the user view
405435
list, and also in any Product Inventory list using that Package.
@@ -414,31 +444,25 @@ You can:
414444
* Review and edit your Product Package assignments to record your analysis, the actions
415445
you have taken, and the current status of your usage of that Package.
416446

417-
1. Get in touch with nexB to request your credentials for the **VulnerableCodeDB**
418-
service.
419-
420-
2. Set those credentials in your local DejaCode configuration file ``.env``.
421-
422-
See :doc:`/application-settings` for more details on the configuration system.
423-
424-
.. code-block:: python
425-
426-
VULNERABLECODE_URL=https://vulnerablecodedb.url/
427-
VULNERABLECODE_API_KEY=PROVIDED_BY_NEXB
428-
429-
**Restarting the services is required following any changes to .env:**
430-
431-
.. code-block:: bash
447+
VulnerableCodeDB service
448+
^^^^^^^^^^^^^^^^^^^^^^^^
432449

433-
docker compose restart web worker
450+
A public instance of **VulnerableCodeDB** is available at
451+
https://public.vulnerablecode.io/api/
434452

453+
Alternatively, you have the option to run your instance of VulnerableCodeDB by
454+
following the documentation provided at https://vulnerablecode.readthedocs.io/
435455

436-
3. Enable **VulnerableCodeDB access** on your Dataspace from the
437-
**Administration dashboard**.
456+
Set the VulnerableCodeDB Server URL and API key in your Dataspace Configuration
457+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
438458

439-
Select **Dataspaces** and open your Dataspace definition.
440-
In the **Application Process Settings** section,
441-
check the **Enable VulnerableCodeDB access** option and save.
459+
- Access your DejaCode web application **Administration dashboard**.
460+
- Navigate to the **Dataspaces** section and select your Dataspace name.
461+
- Within the **Application Process Settings** section, enable the
462+
**Enable VulnerableCodeDB access** option.
463+
- Update the values for the **VulnerableCode URL** and **VulnerableCode API key**
464+
fields located in the **Configuration** panel at the bottom of the form.
465+
- Click the **Save** button.
442466

443467
You can now see Vulnerabilities in the Packages user view.
444468
The availability of the services can be checked by clicking on your user name in the

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ Welcome to the very start of your DejaCode journey!
99
:caption: Getting Started
1010

1111
installation
12-
application-settings
1312
dataspace
13+
application-settings
1414

1515
.. toctree::
1616
:maxdepth: 1

0 commit comments

Comments
 (0)