Skip to content

Commit 43907e5

Browse files
author
James Lagermann
committed
Updated lab 1 to move authentication to lab 0
1 parent 5310693 commit 43907e5

File tree

1 file changed

+1
-185
lines changed

1 file changed

+1
-185
lines changed

docs/class3/module1/lab1.rst

+1-185
Original file line numberDiff line numberDiff line change
@@ -11,196 +11,12 @@ Module |labmodule|\, Lab\ |labnum|\: Provisioning AFM
1111
Overview
1212
--------
1313

14-
In this lab, the iControl REST API will be used to provision a module on the BIG-IP. More specifically, the Advanced Firewall Manager (AFM) module will be provisioned for use in **Module 1, Lab 2: Configuring AFM (Advanced Firewall Module)**. Before we begin, lets review how to generate an Authentication Token.
14+
In this lab, the iControl REST API will be used to provision a module on the BIG-IP. More specifically, the Advanced Firewall Manager (AFM) module will be provisioned for use in **Module 1, Lab 2: Configuring AFM (Advanced Firewall Module)**.
1515

1616
.. NOTE::
1717
- Use Postman collection to complete this lab.
1818
- Some response content has been removed for brevity.
1919

20-
|labmodule|\.\ |labnum|\.0.1. Get an Authentication Token
21-
----------------------------------------------------------------
22-
23-
The **Authentication Token** is generated by using an HTTP POST with a body containing the username, password, and login provider to the REST endpoint for ``/mgmt/shared/authn/login``.
24-
25-
.. Hint::
26-
1) Select the "F5 SecDevOps" Environment in Postman.
27-
2) Send a **Request** with the following details.
28-
29-
| **Method**
30-
31-
::
32-
33-
POST
34-
35-
| **URL**
36-
37-
::
38-
39-
https://{{big_ip_a_mgmt}}/mgmt/shared/authn/login
40-
41-
| **Headers**
42-
43-
::
44-
45-
Content-Type: application/json
46-
47-
| **Body**
48-
49-
::
50-
51-
{
52-
"username":"admin"
53-
"password":"admin"
54-
"loginProviderName":"tmos"
55-
}
56-
57-
3) Copy the **token** you received into the **big_ip_a_auth_token** Postman environment variable.
58-
59-
60-
**Example Response**
61-
62-
.. code-block:: rest
63-
:emphasize-lines: 8
64-
65-
{
66-
"username": "admin",
67-
"loginReference": {
68-
"link": "https://localhost/mgmt/cm/system/authn/providers/tmos/1f44a60e-11a7-3c51-a49f-82983026b41b/login"
69-
},
70-
"loginProviderName": "tmos",
71-
"token": {
72-
"token": "TCJMWPGBQGPZPJYUCY57J2IITA",
73-
"name": "TCJMWPGBQGPZPJYUCY57J2IITA",
74-
"userName": "admin",
75-
"authProviderName": "tmos",
76-
"user": {
77-
"link": "https://localhost/mgmt/shared/authz/users/admin"
78-
},
79-
"timeout": 1200,
80-
"startTime": "2018-08-01T08:05:37.679-0700",
81-
"address": "10.1.1.250",
82-
"partition": "[All]",
83-
"generation": 1,
84-
"lastUpdateMicros": 1533135937678293,
85-
"expirationMicros": 1533137137679000,
86-
"kind": "shared:authz:tokens:authtokenitemstate",
87-
"selfLink": "https://localhost/mgmt/shared/authz/tokens/TCJMWPGBQGPZPJYUCY57J2IITA"
88-
},
89-
"generation": 0,
90-
"lastUpdateMicros": 0
91-
}
92-
93-
|labmodule|\.\ |labnum|\.0.2. Verify the Authentication Token Works
94-
--------------------------------------------------------------------
95-
96-
.. Hint::
97-
1) Send a **Request** with the following details.
98-
99-
| **Method**
100-
101-
::
102-
103-
GET
104-
105-
| **URL**
106-
107-
::
108-
109-
https://{{big_ip_a_mgmt}}/mgmt/tm/ltm
110-
111-
| **Headers**
112-
113-
::
114-
115-
X-F5-Auth-Token: {{big_ip_a_auth_token}}
116-
117-
| **Body**
118-
119-
120-
**Example Response**
121-
122-
.. code-block:: rest
123-
124-
{
125-
"kind": "tm:ltm:ltmcollectionstate",
126-
"selfLink": "https://localhost/mgmt/tm/ltm?ver=13.1.0.8",
127-
"items": [
128-
{
129-
"reference": {
130-
"link": "https://localhost/mgmt/tm/ltm/auth?ver=13.1.0.8"
131-
}
132-
},
133-
{
134-
"reference": {
135-
"link": "https://localhost/mgmt/tm/ltm/cipher?ver=13.1.0.8"
136-
}
137-
},
138-
{
139-
"reference": {
140-
"link": "https://localhost/mgmt/tm/ltm/data-group?ver=13.1.0.8"
141-
}
142-
},
143-
144-
|labmodule|\.\ |labnum|\.0.3. Set the Authentication Token Timeout
145-
-------------------------------------------------------------------
146-
147-
The **Authentication Token** timeout is set using an HTTP PATCH with a body containing the desired value to the REST endpoint for ``mgmt/shared/authz/tokens/{{big_ip_a_auth_token}}``.
148-
149-
.. Hint::
150-
1) Send a **Request** with the following details.
151-
152-
| **Method**
153-
154-
::
155-
156-
PATCH
157-
158-
| **URL**
159-
160-
::
161-
162-
https://{{big_ip_a_mgmt}}/mgmt/shared/authz/tokens/{{big_ip_a_auth_token}}
163-
164-
| **Headers**
165-
166-
::
167-
168-
Content-Type: application/json
169-
X-F5-Auth-Token: {{big_ip_a_auth_token}}
170-
171-
| **Body**
172-
173-
::
174-
175-
{
176-
"timeout":"36000"
177-
}
178-
179-
180-
**Example Response**
181-
182-
.. code-block:: rest
183-
:emphasize-lines: 9
184-
185-
{
186-
"token": "X54G4KAQUEGFZX2J7MUMFBKBC5",
187-
"name": "X54G4KAQUEGFZX2J7MUMFBKBC5",
188-
"userName": "admin",
189-
"authProviderName": "tmos",
190-
"user": {
191-
"link": "https://localhost/mgmt/shared/authz/users/admin"
192-
},
193-
"timeout": 36000,
194-
"startTime": "2018-08-01T08:27:58.961-0700",
195-
"address": "10.1.1.250",
196-
"partition": "[All]",
197-
"generation": 2,
198-
"lastUpdateMicros": 1533137298286141,
199-
"expirationMicros": 1533173278961000,
200-
"kind": "shared:authz:tokens:authtokenitemstate",
201-
"selfLink": "https://localhost/mgmt/shared/authz/tokens/X54G4KAQUEGFZX2J7MUMFBKBC5"
202-
}
203-
20420
|labmodule|\.\ |labnum|\.1. Determine the license state
20521
------------------------------------------------------------------
20622

0 commit comments

Comments
 (0)