Skip to content

Commit

Permalink
Merge pull request #115 from f5devcentral/alfredo-oct02
Browse files Browse the repository at this point in the history
Alfredo oct02
  • Loading branch information
vistola authored Oct 18, 2024
2 parents da7a878 + 5455134 commit 3bfe545
Show file tree
Hide file tree
Showing 11 changed files with 57 additions and 12 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/docs/_build/*
#!/docs/_build/html/
#/docs/_build/html/*
#!/docs/_build/html/assets/
#!/docs/_build/html/assets/
docs/__pycache__/custom_roles.cpython-311.pyc
Binary file modified docs/__pycache__/custom_roles.cpython-311.pyc
Binary file not shown.
66 changes: 55 additions & 11 deletions docs/class4/module2/lab2/lab2.rst
Original file line number Diff line number Diff line change
@@ -1,28 +1,72 @@
Enable API code scanning discovery (under construction)
=======================================================

F5 Solutions can protect API during the full API Develoment Lifecycle. It means F5 can detect and learn API endpoints when developers push the code into the repository.
This is call **API Code Scanning Discovery**
F5 solutions can detect and protect APIs during the full API develoment lifecycle which includes also to learn API endpoints and further information to e.g. build the schema from the source code the developers create and maintain on the code repository.

The sentence application source code is available into our public Github repository : https://github.com/MattDierick/sentence-source-code
We use the "Sentence application" source code for this lab: https://github.com/ca-scans/sentence-source-code-v2


.. note:: There is also a video and a FAQ available for F5 employees

* FAQ - XC API code scan `FAQ <https://f5.sharepoint.com/sites/SalesCoP/SitePages/XC-API-code-scan-FAQ.aspx>`_
* Video – API discovery from `code <https://f5.sharepoint.com/sites/SalesCoP/SitePages/API-discovery-from-code---introduction-video.aspx>`_

|
Enable Code Base Integration
----------------------------

* Goto Web App & API Protection > API Management > Code Base Ingration
* Add a new code base integration profile
* Add a new "Code Base Integration" with the following values

* Name: ``github-sentence``
* Code base: ``Github Integration``
* Github Name: ``f5xclab``
* GitHub Personal Access Token: paste and blindfold below Token
* Github UserName: ``please check the "internal" tab in the UDF deployment for the username``
* GitHub Personal Access Token: ``please check the "internal" tab in the UDF deployment for the token``


.. image:: ../pictures/code-base-integration-username.png
:align: left

|
* Click on Configure under "GitHub Personal Access Token" to enter the token into "Secret to Blindfold".

.. image:: ../pictures/code-base-integration-token-blindfold.png
:align: left


* Click Apply and Save and Exit
* Go to settings and change it as shown in the screenshot below to display further information. The Health status should change from "INITIALIZING" to "CONNECTED".

.. code-block:: bash
sdlkjflksdjglkdfshglkjdflgjldksfgjlksd
.. image:: ../pictures/code-base-integration-initializing-and-show-settings.png
:align: left

|
* XC is going to scan the code, so give it some time until you see further updates on e.g. the "Number of API Repositories"

.. image:: ../pictures/code-base-integration-connected.png
:align: left

|
Assign the Code Base Integration to the Load Balancer
-----------------------------------------------------

* Edit your Load Balancer, go to the API Protection and enable API Discovery (keep the default settings)


.. image:: ../pictures/API-discovery-enable.png
:align: left

1. In the same configuration screen, look for API repositories and click on Configure
2. In "Select Code Base Integrations" click on "Add Item"
3. Select the previously created Code Base "github-sentence"
4. Select "Selected API Repositories"
5. Select ca-scans/sentence-source-code-v2

.. image:: ../pictures/code-based-repo.png
.. image:: ../pictures/select-api-repo-code.png
:align: left

* Save
Select Apply twice and Save and Exit
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/class4/module2/pictures/Internal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3bfe545

Please sign in to comment.