-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[entraid] add setup script for offline clusters. (#47863)
* [entraid] add setup script for offline clusters. This PR adds a cli configuration for Entra ID where it's possible to default to system credentials instead of relying on OIDC for authentication in EntraID. OIDC is not always a possibility specially when the cluster is private and not internet acessible. The UX is the following: ```text Step 1: Run the Setup Script 1. Open **Azure Cloud Shell** (Bash) using **Google Chrome** or **Safari** for the best compatibility. 2. Upload the setup script using the **Upload** button in the Cloud Shell toolbar. 3. Once uploaded, execute the script by running the following command: $ bash entraid.sh **Important Considerations**: - You must have **Azure privileged administrator permissions** to complete the integration. - Ensure you're using the **Bash** environment in Cloud Shell. - During the script execution, you'll be prompted to run 'az login' to authenticate with Azure. **Teleport** does not store or persist your credentials. - **Mozilla Firefox** users may experience connectivity issues in Azure Cloud Shell; using Chrome or Safari is recommended. Once the script completes, type 'continue' to proceed, 'exit' to quit: continue Step 2: Input Tenant ID and Client ID With the output of Step 1, please copy and paste the following information: Enter the Tenant ID: 1056b571-0390-4b08-86c8-2edba8d9ae79 Enter the Client ID: 1056b571-0390-4b08-86c8-2edba8d9ae79 Successfully created EntraID plugin "name". ``` Signed-off-by: Tiago Silva <[email protected]> * move function to api * handle code review comments * Apply suggestions from code review Co-authored-by: Marco Dinis <[email protected]> * fix url * enable group claims * add godoc * handle code review comments * fix gomod --------- Signed-off-by: Tiago Silva <[email protected]> Co-authored-by: Marco Dinis <[email protected]>
- Loading branch information
1 parent
254c4c4
commit 8c8f8a8
Showing
16 changed files
with
534 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
Copyright 2024 Gravitational, Inc. | ||
Licensed 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. | ||
*/ | ||
package entraid | ||
|
||
import ( | ||
"net/url" | ||
"path" | ||
) | ||
|
||
// FederationMetadataURL returns the URL for the federation metadata endpoint | ||
func FederationMetadataURL(tenantID, appID string) string { | ||
return (&url.URL{ | ||
Scheme: "https", | ||
Host: "login.microsoftonline.com", | ||
Path: path.Join(tenantID, "federationmetadata", "2007-06", "federationmetadata.xml"), | ||
RawQuery: url.Values{ | ||
"appid": {appID}, | ||
}.Encode(), | ||
}).String() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.