Elyse KCD CONFIGURATION
OVERVIEW
What is KCD? Kerberos Constrained Delegation (KCD) is a Windows security feature that allows one service to act on behalf of a user when talking to another service. In the context of Elyse, it allows the backend web server to “pass along” the identity of the person using the application when it connects to the database. This means the database knows which user is making each request, not just that “the backend application” is making a request.
This is essential for the security model: every database connection is made under the Windows identity of the actual user, not the application service account. Without KCD, the backend cannot pass the user's identity through to SQL Server (the “double-hop” problem), and all database connections would appear as the service account, breaking user-level access control.
This document covers:
- Service Principal Name (SPN) registration — SPNs are like name tags that tell Windows “this service account is responsible for running this particular service on this particular server.” Without them, Kerberos authentication cannot work.
- Constrained Delegation configuration in Active Directory — this is where you tell Windows that the backend service account is allowed to act on behalf of users, but only when talking to SQL Server (not to any other service).
- Verification procedures — how to confirm everything is set up correctly.
Prerequisites from previous steps:
- Active Directory configured per Domain Setup
- Service accounts
svc_sqlandsvc_elyse_becreated - SQL Server installed per SQL Server & Database
- SQL Server listening on TCP port 1433
PREREQUISITES
- Domain Administrator credentials (or delegated rights to manage SPNs and delegation). You must be logged in to the Domain Controller as a Domain Admin (e.g.,
YOURDOMAIN\Administrator). - Access to Active Directory Users and Computers (ADUC) on the Domain Controller. To open ADUC: open Server Manager (it usually opens automatically when you log in; if not, click the Start button and type Server Manager, then click the result), then click Tools in the top-right menu bar, then click Active Directory Users and Computers.
- The following information:
SQL Server hostname e.g., ELYSE-SQL01SQL Server FQDN e.g., ELYSE-SQL01.yourdomain.comSQL Server port 1433SQL service account YOURDOMAIN\svc_sqlBackend hostname e.g., ELYSE-BE01Backend FQDN e.g., ELYSE-BE01.yourdomain.comBackend service account YOURDOMAIN\svc_elyse_be
Replace YOURDOMAIN, hostnames, and FQDNs with your actual values throughout this document.
BACKGROUND: THE DOUBLE-HOP PROBLEM
Why is this section important? Understanding the double-hop problem helps you understand why all the steps in this document are necessary. If you just want to get things working, you can skip ahead to Step 1, but reading this section will help you troubleshoot if something goes wrong.
In a standard Windows Authentication scenario, there are two “hops” (network connections):
Hop 1: When a user opens the Elyse application in their web browser, their PC authenticates to the backend server. Windows handles this automatically — the user does not need to type a password because they are already logged in to the domain.
Hop 2: The backend server then needs to connect to SQL Server to fetch data. Ideally, it should connect as the user so that SQL Server knows who is actually requesting the data.
The problem: By default, Windows does not allow the backend to forward the user's credentials to SQL Server. The backend knows who the user is (from Hop 1), but it cannot prove that identity to SQL Server (Hop 2). This is the “double-hop” problem.
KCD solves this by doing two things (which are the two main steps in this document):
- Registering SPNs (Step 1 below) — this tells Windows “the
svc_sqlaccount runs SQL Server on this machine” and “thesvc_elyse_beaccount runs the HTTP backend on that machine.” Think of SPNs as name tags that link a service to the account that runs it. - Configuring Constrained Delegation (Step 2 below) — this tells Windows “the
svc_elyse_beaccount is allowed to request Kerberos tickets on behalf of users, but only for the SQL Server service.” This is the “constrained” part — it cannot impersonate users to any other service.
The result is that SQL Server sees the actual user's Windows identity on every connection, enabling user-level access control in the database.
STEP 1: REGISTER SERVICE PRINCIPAL NAMES (SPNs)
SPNs link a service (e.g., SQL Server, HTTP) to the domain account that runs it. Kerberos uses SPNs to locate the correct account when issuing tickets. Without SPNs, Kerberos cannot determine which account is responsible for a service, and authentication will fail.
Perform these commands on the Domain Controller (e.g., DC01) while logged in as a Domain Administrator.
How to open a Command Prompt as Administrator:
- Click the Start button (the Windows icon in the bottom-left corner of the taskbar, or press the Windows key on your keyboard).
- Type cmd (you do not need to click anywhere first — just start typing and the search will appear).
- In the search results, you will see Command Prompt. Right-click on it.
- Select Run as administrator from the context menu.
- If a “User Account Control” (UAC) prompt appears asking “Do you want to allow this app to make changes to your device?”, click Yes.
- A black window with white text will open. The title bar should say Administrator: Command Prompt (the word “Administrator” confirms you have elevated privileges).
ELYSE-SQL01, ELYSE-BE01, yourdomain.com, and YOURDOMAIN with your actual server hostnames, FQDN, and domain name. The hostnames must exactly match the server names as they appear in Active Directory.
In the Command Prompt window, type or paste each of the following commands and press Enter after each one:
SQL Server SPNs (link SQL Server to svc_sql)
These two commands tell Windows: “The svc_sql account is responsible for running SQL Server on the machine named ELYSE-SQL01.” Two commands are needed — one using the full domain name (FQDN) and one using just the short hostname — because clients may connect using either form.
setspn -S MSSQLSvc/ELYSE-SQL01.yourdomain.com:1433 YOURDOMAIN\svc_sql
setspn -S MSSQLSvc/ELYSE-SQL01:1433 YOURDOMAIN\svc_sql
Type (or copy and paste) the first command and press Enter. Wait for the response, then type (or paste) the second command and press Enter.
Backend HTTP SPNs (link the backend HTTP service to svc_elyse_be)
These two commands tell Windows: “The svc_elyse_be account is responsible for running the HTTP web service on the machine named ELYSE-BE01.”
setspn -S HTTP/ELYSE-BE01.yourdomain.com YOURDOMAIN\svc_elyse_be
setspn -S HTTP/ELYSE-BE01 YOURDOMAIN\svc_elyse_be
Again, type (or paste) each command one at a time and press Enter after each.
Frontend Proxy SPNs (separate-server deployments)
When the frontend and backend are on different servers, the user’s browser connects to the frontend hostname (e.g., ELYSE-FE01) and requests a Kerberos ticket for HTTP/ELYSE-FE01. The frontend’s ARR reverse proxy forwards this ticket to the backend. For the backend to accept it, svc_elyse_be must also have HTTP SPNs registered for the frontend hostname:
setspn -S HTTP/ELYSE-FE01.yourdomain.com YOURDOMAIN\svc_elyse_be
setspn -S HTTP/ELYSE-FE01 YOURDOMAIN\svc_elyse_be
What to expect: Each command should respond with text similar to: “Registering ServicePrincipalNames for ...” followed by “Updated object”. This means the SPN was registered successfully.
If you see “Duplicate SPN found”, the SPN is already registered. This is not necessarily an error — it may have been registered previously. Verify it is registered to the correct account using the verification commands in Step 3.
STEP 2: CONFIGURE CONSTRAINED DELEGATION
This step configures the backend service account (svc_elyse_be) to be trusted for delegation to the SQL Server service only. This is “constrained” delegation because it limits which services the account can impersonate users to. In plain terms: you are telling Windows “the backend is allowed to act on behalf of users, but only when talking to SQL Server — nothing else.”
This step is performed in the Active Directory Users and Computers (ADUC) tool on the Domain Controller.
Step 2a: Enable Advanced Features in ADUC
- Open ADUC on the Domain Controller:
- Open Server Manager (it usually opens automatically when you log in to a Windows Server; if not, click the Start button and type Server Manager, then click the result).
- In Server Manager, click Tools in the top-right menu bar.
- From the drop-down menu, click Active Directory Users and Computers.
- A new window titled “Active Directory Users and Computers” will open. This is ADUC.
- In the ADUC window, click the View menu in the menu bar at the top of the window.
- In the drop-down menu, look for Advanced Features. If it has a tick/checkmark next to it, it is already enabled and you can close the menu. If it does not have a tick, click it to enable it. The menu will close and the view will refresh.
Step 2b: Configure Delegation on the Backend Service Account
- In the ADUC window (still open from Step 2a), look at the left panel. You will see your domain name (e.g.,
yourdomain.com). Click the small ▶ arrow (or + icon) next to it to expand it and reveal the folders (called Organizational Units, or OUs) underneath. - Click on the Elyse OU (this is the folder where the
svc_elyse_beaccount was created during Domain Setup). When you click it, the right panel will show the contents of that OU. - In the right panel, locate the
svc_elyse_beaccount. It will appear as a user icon with the name Backend Service Account (this is the Full Name that was set during Domain Setup). - Right-click on Backend Service Account and select Properties from the context menu. A properties dialog window will open with multiple tabs across the top.
- Click the Delegation tab (it is one of the tabs along the top of the properties window).
Note: If the Delegation tab is not visible: verify that Advanced Features is checked (Step 2a); verify that SPNs were successfully registered for this account (Step 1) — the Delegation tab only appears on accounts that have at least one SPN registered; close and reopen ADUC, then try again.
- On the Delegation tab, you will see several radio button options. Select (click on): “Trust this user for delegation to specified services only”. This tells Windows that this account is allowed to act on behalf of users, but only for specific services that you will define next.
- Below that, two more radio buttons will become available. Select: “Use Kerberos only”
Why “Use Kerberos only”: This is the tighter security posture. It requires that the user’s initial authentication to the backend is already Kerberos — the backend can only delegate the user’s identity to SQL Server if it received a genuine Kerberos ticket from the user in the first place. This ensures end-to-end Kerberos authentication and prevents delegation of identities that were authenticated via weaker protocols such as NTLM.
The alternative option, “Use any authentication protocol”, enables Kerberos Protocol Transition, which allows the backend to accept authentication via any method (including NTLM) and then obtain a Kerberos ticket to SQL Server on behalf of the user. NTLM is a weaker protocol (susceptible to relay attacks, no mutual authentication) and allowing it to feed into delegation widens the attack surface. Do not select this option. - Click the Add... button (located below the empty services list in the lower half of the dialog). A new dialog titled “Add Services” will appear.
- In the “Add Services” dialog, click the “Users or Computers...” button. Another dialog titled “Select Users or Computers” will appear.
- In the text box at the bottom of the “Select Users or Computers” dialog, type:
svc_sql. Then click the “Check Names” button. The text should change to show the full account name with an underline (e.g.,YOURDOMAIN\svc_sql), confirming Windows found the account. Click OK. - You will be returned to the “Add Services” dialog. It will now show a list of “Available services” — these are the SPNs you registered in Step 1. Select (click on) the MSSQLSvc entry (or entries) that correspond to your SQL Server. If there are multiple MSSQLSvc entries, select all of them by holding Ctrl and clicking each one.
- Click OK to close the “Add Services” dialog. You will be returned to the Delegation tab, and the services list should now show the MSSQLSvc entries you selected.
- Click Apply (bottom-right of the properties window) to save the changes, then click OK to close the properties window.
STEP 3: VERIFICATION
Step 3a: Verify SPNs
Open a Command Prompt as Administrator on the Domain Controller (if you still have the one from Step 1 open, you can use that; otherwise, follow the same steps: click Start, type cmd, right-click Command Prompt, select Run as administrator, click Yes on the UAC prompt).
Type or paste each of the following commands and press Enter. These commands list the SPNs registered to each account (the -L flag means “list”):
setspn -L YOURDOMAIN\svc_sql
Expected output (2 entries):
MSSQLSvc/ELYSE-SQL01.yourdomain.com:1433
MSSQLSvc/ELYSE-SQL01:1433
setspn -L YOURDOMAIN\svc_elyse_be
Expected output (2 entries for same-server, or 4 entries for separate-server deployments):
HTTP/ELYSE-BE01.yourdomain.com
HTTP/ELYSE-BE01
HTTP/ELYSE-FE01.yourdomain.com <-- separate-server only
HTTP/ELYSE-FE01 <-- separate-server only
If any entries are missing, re-run the corresponding setspn command from Step 1.
If an SPN is registered to the wrong account, remove it first:
setspn -D MSSQLSvc/ELYSE-SQL01:1433 WRONGDOMAIN\wrong_account
Then re-register it to the correct account.
Step 3b: Verify Delegation Configuration
- Switch to the ADUC window (if it is still open from Step 2). If you closed it, reopen it: open Server Manager, click Tools in the top-right menu bar, then click Active Directory Users and Computers.
- Ensure Advanced Features is enabled: click the View menu at the top of the ADUC window and verify that Advanced Features has a tick/checkmark next to it.
- In the left panel, expand your domain name and click on the Elyse OU. In the right panel, right-click Backend Service Account (
svc_elyse_be) and select Properties. - Click the Delegation tab.
- Verify the following three things are all correct:
- “Trust this user for delegation to specified services only” is selected.
- “Use Kerberos only” is selected.
- The services list shows the MSSQLSvc entry for
svc_sql.
Step 3c: End-to-End Verification (After Application Deployment)
Note: This verification step can only be performed after the backend and frontend are fully deployed. If you are following the deployment guides in order, come back to this step after completing Backend Installation (Server) and Frontend Installation.
- On a domain-joined workstation (not the server), open a web browser (e.g., Microsoft Edge or Google Chrome).
- Navigate to the Elyse application URL (e.g.,
https://elyse-fe01.yourdomain.com). - Log in as a regular domain user (not the administrator).
- In the application, navigate to: Connected User > Who is this?
- The username displayed should match the Windows login of the person using the browser (e.g.,
YOURDOMAIN\jsmith), NOT the service account (svc_elyse_be).
If the service account name is displayed instead of the user's name, KCD is not working correctly. Check the following (in order of likelihood):
- SPNs are registered correctly (Step 3a).
- Delegation is configured correctly (Step 3b).
- The backend
.envfile hasUSE_KCD=true. - The IIS application pool is running as
svc_elyse_be. - The SQL Server service is running as
svc_sql. - DNS resolves the server hostnames correctly.
- There are no duplicate SPNs (run:
setspn -Xto check for duplicates across the entire domain).
TROUBLESHOOTING
Problem: Delegation tab is missing on the service account
Cause: This is the most common issue. The Delegation tab only appears when both of these conditions are met: (1) Advanced Features is enabled in ADUC, and (2) the account has at least one SPN registered.
Fix:
- In ADUC, click the View menu and ensure Advanced Features has a tick next to it.
- Open a Command Prompt as Administrator and run:
setspn -L YOURDOMAIN\svc_elyse_be. If no SPNs are listed, re-run thesetspn -Scommands from Step 1. - After registering SPNs, close and reopen ADUC, then check the account properties again.
Problem: “Duplicate SPN found” error when registering SPNs
Cause: The SPN is already registered to another account.
Fix: Find the existing registration:
setspn -Q MSSQLSvc/ELYSE-SQL01:1433
Remove it from the wrong account:
setspn -D MSSQLSvc/ELYSE-SQL01:1433 WRONGDOMAIN\wrong_account
Re-register to the correct account.
Problem: SPNs registered with placeholder domain name instead of actual domain
Symptom: Running setspn -L shows FQDN entries containing yourdomain.com (the placeholder from the documentation) instead of your actual domain name. For example:
MSSQLSvc/ELYSE-SQL01.yourdomain.com:1433 <-- wrong
MSSQLSvc/ELYSE-SQL01:1433 <-- correct (short name is fine)
Cause: The setspn commands from Step 1 were run without first replacing the placeholder values (yourdomain.com, YOURDOMAIN) with the actual domain name and NetBIOS name.
Fix: Remove the incorrect FQDN SPNs and re-register them with the correct domain. Replace yourdomain.com and YOURDOMAIN with your actual values in the commands below:
setspn -D MSSQLSvc/ELYSE-SQL01.yourdomain.com:1433 YOURDOMAIN\svc_sql
setspn -D HTTP/ELYSE-BE01.yourdomain.com YOURDOMAIN\svc_elyse_be
setspn -S MSSQLSvc/ELYSE-SQL01.actualdomain.com:1433 YOURDOMAIN\svc_sql
setspn -S HTTP/ELYSE-BE01.actualdomain.com YOURDOMAIN\svc_elyse_be
Then verify with:
setspn -L YOURDOMAIN\svc_sql
setspn -L YOURDOMAIN\svc_elyse_be
All FQDN entries should now show your actual domain suffix. The short hostname entries (without a domain suffix) do not need to be changed.
Problem: KCD works for some users but not others
Cause: The failing users may not be members of the Elyse_Users AD group, or their Kerberos tickets may be stale (expired or cached from before the configuration was completed).
Fix:
- Verify the user is a member of the
Elyse_Usersgroup in ADUC. - Have the user log out of their workstation completely and log back in. This forces Windows to obtain fresh Kerberos tickets.
- If that does not help, on the user's workstation (not the server), open a Command Prompt (click Start, type cmd, press Enter) and run:
klist purge
This clears all cached Kerberos tickets. The user should then close the browser, log out, and log back in.
Problem: Backend returns 401 Unauthorized
Cause: Windows Authentication may not be enabled in IIS, the HTTP SPN may be incorrect, or useAppPoolCredentials is not set.
Fix: Verify IIS Windows Authentication is enabled (see Backend Installation (Server) — Step 7). Verify useAppPoolCredentials is set to true on the backend site. Verify HTTP SPNs match the backend hostname exactly. For separate-server deployments, also verify HTTP SPNs are registered for the frontend hostname.
Problem: Browser prompts for credentials instead of passing through automatically
Cause: Kerberos authentication is not completing transparently. This can happen for several reasons.
Fix: Check the following in order:
- Ensure you are accessing the application using a hostname (e.g.,
http://ELYSE-FE01:8080), notlocalhostor an IP address. Kerberos requires a hostname to locate the correct SPN. - Verify the URL is in the browser’s Local Intranet zone. On domain-joined Windows machines, single-label hostnames (e.g.,
ELYSE-FE01) are automatically treated as Intranet. FQDNs (e.g.,elyse-fe01.yourdomain.com) may need to be added to the Intranet zone via Group Policy or Internet Options > Security > Local Intranet > Sites > Advanced. - Verify HTTP SPNs are registered for the hostname in the URL (run
setspn -L YOURDOMAIN\svc_elyse_beand check the output). - Verify
useAppPoolCredentialsis set totrueon the backend IIS site (see Backend Installation (Server) — Step 7). - Clear cached Kerberos tickets on the workstation: open a Command Prompt and run
klist purge, then close and reopen the browser.
Problem: SQL Server connection fails with “Login failed for user”
Cause: The user's identity is not being passed through (KCD failure), or the user is not a member of the Elyse_Users AD group.
Fix: Check the SQL Server error log for the exact login name that was attempted. If it shows the service account name, KCD is not working — review all steps above. If it shows the user's name, verify the user is in the Elyse_Users group and the SQL Server login for that group exists.
NEXT STEPS
- Install the backend application layer: Backend Installation (Server)
- Install the frontend application layer: Frontend Installation
- After both layers are installed, proceed to Bootstrapping to onboard users and configure the system.