FortiAuthenticator
FortiAuthenticator provides centralized authentication services for the Fortinet Security Fabric including multi-factor authentication, single sign-on services, certificate management, and guest management.
achu
Staff
Staff
Article Id 379693
Description

This article describes recovering a lost REST API key for a user. The FortiAuthenticator REST API key is used to authenticate and authorize access to FortiAuthenticator REST API. This is required for FortiAuthenticator Agent for Microsoft Windows to apply or integrate two-factor authentication.

Scope

FortiAuthenticator.

Solution
  1. Unzip the FortiAuthenticator backup file.
                                                   

Image-1.png

 

  1. Open/edit backup.sql in Notepad.

Image-2.png

 

  1. In Notepad, search or find 'COPY public.webservice_apiaccess', the API keys are 'BiwapaV2TCUl6Yva3OtV0LgLA1nA0te62wr6EGWu' and '2PzVfaP2XFNR0E67rJ3fgcOdKra3pIQgCRqWMNUq' which belongs to two different users named ftnt_user and ftnt_user2.

 

COPY public.webservice_apiaccess (id, user_id, secret, created) FROM stdin;
5 92 BiwapaV2TCUl6Yva3OtV0LgLA1nA0te62wr6EGWu 2025-03-01 17:53:43.217534+00
6 93 2PzVfaP2XFNR0E67rJ3fgcOdKra3pIQgCRqWMNUq 2025-03-01 17:54:33.032451+00
\.

 

  1. To determine which API key belongs to a user, take note user ID is highlighted with red, in notepad search for 'Data for Name: auth_user;'. In this example, ftnt_user1 user_id is 92with API key 'BiwapaV2TCUl6Yva3OtV0LgLA1nA0te62wr6EGWu' and ftnt_user2 user_id is 93with API key '2PzVfaP2XFNR0E67rJ3fgcOdKra3pIQgCRqWMNUq'.

     

 

--
-- Data for Name: auth_user; Type: TABLE DATA; Schema: public; Owner: www-data
--

COPY public.auth_user (id, password, last_login, is_superuser, username, first_name, last_name, email, is_staff, is_active, date_joined, is_social, archived_password, is_api_restricted, is_gui_restricted) FROM stdin;
1 BCRYPT$243261243037246A6E732E4C4F71715142594F6A423150436D69596875536B6B7356446D7A546C4370795A78463142433942504C5A754D4C492E464F004A9BC3 \N t admin t t 2013-04-17 23:31:18.674+00 f f t
3 AES256$25A76649728630C4B48545DA4B46DEDDD8F33D0E5C1A604E6827C71D9498423E$DE452AD9129517A357E8C18FE0C2B082818D2CCA5D247F808D85A1E7D40BD3CEE33166354A7865726101EC92E98F726386C006FDE14C63F0195D59C2D6057B60 \N f adam Adam f t 2025-03-01 12:14:47.752048+00 f f t
92 BCRYPT$243261243037246B3667583466505A2F4374592F7A496369564345742E647448594733586E7A6E7576534A4E36556733457A6735364F6F675757654300CEF3EB \N t ftnt_user1 t t 2025-03-01 17:53:20.511827+00 f f f
4 AES256$EBD8934B57F2F7EC12E2C010C5D5A7800398EAF00F49973F8926298175D2378E$857D08D32E9D9AE4675D5B2857236E47786F701FA267B33E826044FBC1427EB4368AEE7F88F8A6B29D375A01E26AC7E76BBDD0E27A823AE1A82213685E60E5C4 \N f qpbondzd f t 2025-03-01 12:18:14.80631+00 f f t
5 AES256$A01943A49651DBCD20E65F8FBCB05F843EE7C4A970EEC3FFE792CDC085A4F419$01D3ACD308158BD47582186BD09FC655FBF478F46737AE48EA44ACC21AA43588D5C29EF8D08D573603F330C6744BF10C79C6F6AAE1AB84766634CE26E0C36BC3 \N f wmpxkzfv f t 2025-03-01 12:18:14.837174+00 f f t
6 AES256$2C7E18A340138E915303404F71213BBA2EB70D2238E0BCEF7F7A12B24855D594$49598476A89528F1F851E6813DEDAF88ED30A3CC1813CD70AB9C23C844F34581FDE1C29F1712FA77547D744607CD23B248D3A8B56EDCFE1EF993E0FFCEE74E8B \N f uvxsxyhq f t 2025-03-01 12:18:14.856043+00 f f t
7 AES256$01701762D872463676945CCFBA0200F3B9F3DDD7BC6F1F29940FB806F585A6B0$9CA99474C0C6D63D573D08A9F0A960B32A3E655FC029CF5EE97A6C176BE0826A89581EEBCECD59AE74DB37885460924CE974198047D4A3D1DFCB5FF021987FA9 \N f pslsvtil f t 2025-03-01 12:18:14.872699+00 f f t
93 BCRYPT$2432612430372454446D7843745961464356432F764D6E6C42734B374F545244766A53323652556B315736546977614C763058425873664365513832004667B3 \N t ftnt_user2 t t 2025-03-01 17:54:22.094439+00 f f f
8 AES256$00C2E67932B1AFF8B265CD24A946E60C0F6BD67693F46AA38B1658D0573FFDFB$CA6E3766BB591826680586235B288C91690BEEB8F6546C45D4B33CB34C2B2462A9FCA71B218E3FA64E8894BD29015BEF2250B50E512C3EF802CDC59CE3B8EA56 \N f qgucxtdx f t 2025-03-01 12:18:14.889385+00 f f t
9 AES256$E646BEA94D305C693CE35AEBCF5354A1110EAD41436FEBC35C5A36F359E861A8$AFE3A9EC72ADB73F3A838646ED7AA34CF3202E8D7615BC1812674DF3BE3EA6667F36CDDBD76C3EBC201B70FC5A6B1A4B733B90F0CEAD69029974C7A2799DACB1 \N f cnvrgqah f t 2025-03-01 12:18:14.906143+00 f f t

Contributors