FortiGate REST API Token Authentication

Cisco træning

Insoft Services er en af de få uddannelsesudbydere i EMEAR, der tilbyder hele spektret af Cisco-certificering og specialiseret teknologiuddannelse.

Lær hvordan

Cisco-certificeringer

Oplev en blandet læringsmetode, der kombinerer det bedste fra instruktørstyret træning og e-læring i eget tempo for at hjælpe dig med at forberede dig til din certificeringseksamen.

Lær hvordan

Cisco Learning Credits

Cisco Learning Credits (CLCs) er forudbetalte træningskuponer, der indløses direkte med Cisco, og som gør det nemmere at planlægge din succes, når du køber Cisco-produkter og -tjenester.

Lær hvordan

Cisco Efteruddannelse

Cisco Continuing Education Program tilbyder alle aktive certificeringsindehavere fleksible muligheder for at gencertificere ved at gennemføre en række kvalificerede træningselementer.

Lær hvordan

Cisco Digital Learning

Certificerede medarbejdere er VÆRDSATTE aktiver. Udforsk Ciscos officielle digitale læringsbibliotek for at uddanne dig selv gennem optagede sessioner.

Lær hvordan

Cisco Business Enablement

Cisco Business Enablement Partner Program fokuserer på at skærpe Cisco Channel Partners og kunders forretningsmæssige færdigheder.

Lær hvordan

Cisco kursuskatalog

Lær hvordan

Fortinet-certificeringer

Fortinet Network Security Expert (NSE) -programmet er et otte-niveau uddannelses- og certificeringsprogram for at undervise ingeniører i deres netværkssikkerhed for Fortinet FW-færdigheder og erfaring.

Lær hvordan

Fortinet træning

Insoft er anerkendt som Autoriseret Fortinet Training Center på udvalgte steder på tværs af EMEA.

Tekniske kurser

Fortinet kursuskatalog

Udforsk hele Fortinet-træningskataloget. Programmet omfatter en bred vifte af selvstændige og instruktørledede kurser.

Lær hvordan

ATC-status

Tjek vores ATC-status på tværs af udvalgte lande i Europa.

Lær hvordan

Fortinet Professionelle Services

Globalt anerkendte team af certificerede eksperter hjælper dig med at gøre en mere jævn overgang med vores foruddefinerede konsulent-, installations- og migreringspakker til en lang række Fortinet-produkter.

Lær hvordan

Microsoft træning

Insoft Services tilbyder Microsoft-undervisning i EMEAR. Vi tilbyder Microsoft tekniske kurser og certificeringskurser, der ledes af instruktører i verdensklasse.

Tekniske kurser

Extreme træning

Find all the Extreme Networks online and instructor led class room based calendar here.

Tekniske kurser

Tekniske certificeringer

Vi leverer omfattende læseplan for tekniske kompetencefærdigheder på certificeringspræstationen.

Lær hvordan

Extreme kursuskatalog

Lær hvordan

ATP-akkreditering

Som autoriseret uddannelsespartner (ATP) sikrer Insoft Services, at du får de højeste uddannelsesstandarder, der findes.

Lær hvordan

Løsninger og tjenester

Vi leverer innovativ og avanceret support til design, implementering og optimering af IT-løsninger. Vores kundebase omfatter nogle af de største Telcos globalt.

Lær hvordan

Globalt anerkendte team af certificerede eksperter hjælper dig med at gøre en mere jævn overgang med vores foruddefinerede konsulent-, installations- og migreringspakker til en lang række Fortinet-produkter.

Om os

Insoft tilbyder autoriseret uddannelses- og konsulentbistand til udvalgte IP-leverandører. Få mere at vide om, hvordan vi revolutionerer branchen.

Lær hvordan
  • +45 32 70 99 90
  • FortiGate REST API Token Authentication

    16th June, 2022

    Before going through this article, please go over the first part of this series: Getting Started With FortiGate REST API.

    In order to use the FortiOS REST API, you are required to authenticate your API calls using an API token. You can generate an API token by creating a new REST API admin. The unique token will be used to authorize subsequent API calls to your FortiGate device.

    These steps should be carried out from the FortiGate GUI, while logged in as a super admin. Please note that I am using a FortiGate 6.0.3 virtual machine for this tutorial.

    FortiGate API

    Determine your IP address

    • Navigate to the dashboard section on the FortiGate GUI, click on Main and locate the Administrators widget.
    • In the administrators’ widget, hover your mouse over it, you’ll see all current admins, select the show active administrator sessions from your user ID.
    • Copy the source IP address for your-userid as it will be needed to specify trusted hosts in a later step of creating a REST API Admin.
    FortiGate API

    Learn how to use basic and advanced FortiGate features, including security profiles, networking and security. Get started with the Fortinet NSE 4 bundle training.

    FortiGate API

    Create an Administrator profile

    For a start, we will create a profile that only has READ access to the firewall address permission group. For the administrator profile, you can select one of the existing ones or create a new one by clicking on the create icon.

    The new admin profile will require a name and access permissions.

    Name your admin profile appropriately. For this part, it will be Firewall_Read. You can change any of the access control permissions to specifically restrict or limit the functionality.

    As a good practice, the REST API admin should have the minimum permissions required to complete the request.

    In this section, we only need access to the firewall address permission group. Populate the fields as shown in the image below.

    FortiGate API

    Click OK to create the Firewall_Read admin profile with only the Firewall and Address permissions changed as shown. A REST API admin with read-only permission to a resource can only send read requests (HTTP GET) to the resource.

    FortiGate: Create a REST API Admin

    To generate a new REST API admin:

    • Navigate the FortiGate GUI, click on System and select administrators
    • Click on the Create New icon and choose REST API admin

    The New REST API admin window will show up. Give it a descriptive name for the API user. In our case, it will be Firewall_Read_User.

    Disable the public key infrastructure (PKI Group) as it will not be used at the moment. ‘CORS Allow Origin’ will also stay disabled for the moment.

    In the trusted hosts’ field, paste the IP address from previously seen active administrator sessions, and with forward-slash(/32) in order to match your trusted source IP address only.

    Also, in the REST API administrator, you are required to restrict access to one or more trusted subnets. To ensure the API token can only be used from trusted hosts, the source address needs to be specified!

    FortiGate API

    The new REST API admin can now be confirmed by clicking OK.

    The system will automatically generate a new API key, this key will only be displayed once. Please copy that key and hit close. If you lose your API key and you want to generate a new one, you can do so, by going back to the administrator and clicking on the regenerate icon, the regenerated API key will once again be unique and all previous keys will be invalidated.

    How To Create a REST API admin using the CLI

    Modify the sample below to create the REST API admin.

    FortiGate API

    Then generate an API token using the CLI command below. Make note of the token as it is only shown once

    FortiGate API

    FortiGate API

    More Blogs for you:

    Relevant Exams: NSE4