| Title: 1.1.7 - TGS (Ticket Granting Server) |
| NavPrev: 1.1.6-as.html |
| NavPrevText: 1.1.6 - As (Authentication Server) |
| NavUp: 1.1-introduction.html |
| NavUpText: 1.1 - Introduction |
| NavNext: 1.1.8-tickets.html |
| NavNextText: 1.1.8 - Tickets |
| Notice: Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you under the Apache License, Version 2.0 (the |
| "License"); you may not use this file except in compliance |
| with the License. You may obtain a copy of the License at |
| . |
| http://www.apache.org/licenses/LICENSE-2.0 |
| . |
| Unless required by applicable law or agreed to in writing, |
| software distributed under the License is distributed on an |
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| KIND, either express or implied. See the License for the |
| specific language governing permissions and limitations |
| under the License. |
| |
| # 1.1.7 - TGS (Ticket Granting Server) |
| |
| The second major service is the **Ticket Granting Server**, which is the service that delivers tickets for all the managed services to the users. |
| |
| A client can access to this service fater having been authenticated - ie, after having received a ticket allowing it to access the **TGS** from the **AS** -. |
| |
| At this point, all the exchanges are encrypted using the user session key. |
| |
| Ther is not too much to tell about this service, except that ach request sent by the client contains the targeted service principal name, and the ticket issued by the **AS**. |
| |
| ## How it works ? |
| |
| When the **TGS** receives a request, it will read the ticket contained in the request, and will validate it. If the ticket has been issued by the **AS**, then the **TGS** has the **AS** secret key and can decrypt the ticket, otherwise it's potentially a forged ticket, and it will be discarded. |
| |
| The **TGS** then generate a ticket for the targted service, and enncryt it using the service's secret key, then encapsulate this encypted ticket into a response which will be itself encrypted using the client's secret key. |
| |
| The client will receive this response, will decrypt it and extract the encypted ticket, and will send this encrypted ticket to the targeted service, which will be able to decrypt it and validate it. |
| |
| Of course, in the mean time, many checks will be done relative to the ticket validity, so one can be assured that the service is only accessible by those with the credential to do so. |
| |