Skip to content

Commit

Permalink
docs: fix links to guides and enhance auth guides (#17)
Browse files Browse the repository at this point in the history
# 📥 Pull Request

## ❓ What are you trying to address

This pull request includes several updates to documentation to enhance
user context authentication and fix broken links.

## ✨ Description of new changes

### Scope and Path Updates:

* Updated the scope name from `default` to `access` in
`docs/guides/auth_app_reg_user.md` and
`templates/guides/auth_app_reg_user.md.tmpl`
(`api://fabric_terraform_provider`).
[[1]](diffhunk://#diff-f4296a59cca616742a63b2c76988d84e5a11f52dbdd955ae811ac6915de434f1L46-R46)
[[2]](diffhunk://#diff-4178a3604d6c95d8729aa4defc2b5bfe976caef501916683761e47797e03fc7bL46-R46)
* Changed the Azure CLI login scope from
`api://fabric_terraform_provider/default` to
`api://fabric_terraform_provider/.default` in
`docs/guides/auth_app_reg_user.md` and
`examples/guides/auth_app_reg_user/azcli_login.sh` (`az config set
core.enable_broker_on_windows=false`).
[[1]](diffhunk://#diff-f4296a59cca616742a63b2c76988d84e5a11f52dbdd955ae811ac6915de434f1L76-R76)
[[2]](diffhunk://#diff-c16c65839db8487a1465e8b7e047f17deb53650b577ac837c3efc977dfb919cbL11-R11)

### Path Correction in Index Files:

* Corrected relative paths in `docs/index.md` and
`templates/index.md.tmpl` to remove leading `./` for guide links.
[[1]](diffhunk://#diff-b4d68dc855d0f9476d3f2ee343853bd21bf82ea9960d0cf06661baa244439dd6L64-R73)
[[2]](diffhunk://#diff-2787aac6ad1510c9157d238b7b366aa4a6abdeba2429c28affad380e0bd3df26L40-R56)
* Updated the recommendation for using the Azure CLI for authentication
with user context in `docs/index.md` and `templates/index.md.tmpl`.
[[1]](diffhunk://#diff-b4d68dc855d0f9476d3f2ee343853bd21bf82ea9960d0cf06661baa244439dd6L109-R109)
[[2]](diffhunk://#diff-2787aac6ad1510c9157d238b7b366aa4a6abdeba2429c28affad380e0bd3df26L40-R56)
  • Loading branch information
DariuszPorowski authored Sep 26, 2024
1 parent a5c7944 commit 0205923
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 16 deletions.
5 changes: 5 additions & 0 deletions .changes/unreleased/changed-20240925-235434.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
kind: changed
body: Enhanced user context authentication guide
time: 2024-09-25T23:54:34.3572996-07:00
custom:
Issue: "17"
5 changes: 5 additions & 0 deletions .changes/unreleased/fixed-20240925-235302.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
kind: fixed
body: Fixed links in the index doc
time: 2024-09-25T23:53:02.269467-07:00
custom:
Issue: "17"
4 changes: 2 additions & 2 deletions docs/guides/auth_app_reg_user.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ api://fabric_terraform_provider

- Add required scope in the `Scopes defined by this API` section:

1. Scope name: `default`
1. Scope name: `access`
1. Who can consent: `Admins and users`
1. Admin consent display name: `Microsoft Fabric Terraform Provider`
1. Admin consent description: `Allows connection to backend services for Microsoft Fabric Terraform Provider`
Expand Down Expand Up @@ -73,7 +73,7 @@ az config set core.enable_broker_on_windows=false

# Login to Azure with Entra ID credentials
# See https://learn.microsoft.com/cli/azure/authenticate-azure-cli for more details.
az login --allow-no-subscriptions --tenant 00000000-0000-0000-0000-000000000000 --scope api://fabric_terraform_provider/default
az login --allow-no-subscriptions --tenant 00000000-0000-0000-0000-000000000000 --scope api://fabric_terraform_provider/.default
```

The following Fabric Provider block can be specified to use the Azure CLI:
Expand Down
12 changes: 6 additions & 6 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,16 @@ The provider allows authentication via service principal or user credentials. Al
The Fabric provider can use the Azure CLI to authenticate. If you have the Azure CLI installed, you can use it to log in to your Azure account and the Fabric provider will use the credentials from the Azure CLI.

1. [Install the Azure CLI](https://learn.microsoft.com/cli/azure/install-azure-cli)
1. Follow the [Creating an App Registration for the User context to use with Azure CLI](./guides/auth_app_reg_user.md) guide.
1. Follow the [Creating an App Registration for the User context to use with Azure CLI](guides/auth_app_reg_user.md) guide.

### Using a Service Principal

You can find more information on how to do this in the following guides:

- [Authenticating using Managed Identity (MSI)](./guides/auth_msi.md)
- [Authenticating using a Service Principal and OpenID Connect (OIDC)](./guides/auth_spn_oidc.md)
- [Authenticating using a Service Principal and Client Certificate](./guides/auth_spn_cert.md)
- [Authenticating using a Service Principal and Client Secret](./guides/auth_spn_secret.md)
- [Authenticating using Managed Identity (MSI)](guides/auth_msi.md)
- [Authenticating using a Service Principal and OpenID Connect (OIDC)](guides/auth_spn_oidc.md)
- [Authenticating using a Service Principal and Client Certificate](guides/auth_spn_cert.md)
- [Authenticating using a Service Principal and Client Secret](guides/auth_spn_secret.md)

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down Expand Up @@ -106,7 +106,7 @@ You can find more information on how to do this in the following guides:
## Know limitations

- **Capacity**: [Microsoft Fabric trial capacity](https://learn.microsoft.com/fabric/get-started/fabric-trial) is not supported. Only self-provisioned [Fabric Capacity](https://learn.microsoft.com/fabric/enterprise/plan-capacity) on Azure is supported. You can setup your capacity in the [Azure Portal](https://portal.azure.com/#browse/Microsoft.Fabric%2Fcapacities).
- **Service Principal**: Not all Fabric resources support Service Principals yet. For Provider evaluation, we recommend using the [Azure CLI for authentication with User context](./guides/auth_app_reg_user.md).
- **Service Principal**: Not all Fabric resources support Service Principals yet. For Provider evaluation, we recommend using the [Azure CLI for authentication with User context](guides/auth_app_reg_user.md).

## Contributing

Expand Down
2 changes: 1 addition & 1 deletion examples/guides/auth_app_reg_user/azcli_login.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ az config set core.enable_broker_on_windows=false

# Login to Azure with Entra ID credentials
# See https://learn.microsoft.com/cli/azure/authenticate-azure-cli for more details.
az login --allow-no-subscriptions --tenant 00000000-0000-0000-0000-000000000000 --scope api://fabric_terraform_provider/default
az login --allow-no-subscriptions --tenant 00000000-0000-0000-0000-000000000000 --scope api://fabric_terraform_provider/.default
2 changes: 1 addition & 1 deletion templates/guides/auth_app_reg_user.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ api://fabric_terraform_provider

- Add required scope in the `Scopes defined by this API` section:

1. Scope name: `default`
1. Scope name: `access`
1. Who can consent: `Admins and users`
1. Admin consent display name: `Microsoft Fabric Terraform Provider`
1. Admin consent description: `Allows connection to backend services for Microsoft Fabric Terraform Provider`
Expand Down
12 changes: 6 additions & 6 deletions templates/index.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,23 @@ The provider allows authentication via service principal or user credentials. Al
The {{ title .ProviderShortName }} provider can use the Azure CLI to authenticate. If you have the Azure CLI installed, you can use it to log in to your Azure account and the {{ title .ProviderShortName }} provider will use the credentials from the Azure CLI.

1. [Install the Azure CLI](https://learn.microsoft.com/cli/azure/install-azure-cli)
1. Follow the [Creating an App Registration for the User context to use with Azure CLI](./guides/auth_app_reg_user.md) guide.
1. Follow the [Creating an App Registration for the User context to use with Azure CLI](guides/auth_app_reg_user.md) guide.

### Using a Service Principal

You can find more information on how to do this in the following guides:

- [Authenticating using Managed Identity (MSI)](./guides/auth_msi.md)
- [Authenticating using a Service Principal and OpenID Connect (OIDC)](./guides/auth_spn_oidc.md)
- [Authenticating using a Service Principal and Client Certificate](./guides/auth_spn_cert.md)
- [Authenticating using a Service Principal and Client Secret](./guides/auth_spn_secret.md)
- [Authenticating using Managed Identity (MSI)](guides/auth_msi.md)
- [Authenticating using a Service Principal and OpenID Connect (OIDC)](guides/auth_spn_oidc.md)
- [Authenticating using a Service Principal and Client Certificate](guides/auth_spn_cert.md)
- [Authenticating using a Service Principal and Client Secret](guides/auth_spn_secret.md)

{{ .SchemaMarkdown | trimspace }}

## Know limitations

- **Capacity**: [Microsoft Fabric trial capacity](https://learn.microsoft.com/fabric/get-started/fabric-trial) is not supported. Only self-provisioned [Fabric Capacity](https://learn.microsoft.com/fabric/enterprise/plan-capacity) on Azure is supported. You can setup your capacity in the [Azure Portal](https://portal.azure.com/#browse/Microsoft.Fabric%2Fcapacities).
- **Service Principal**: Not all Fabric resources support Service Principals yet. For Provider evaluation, we recommend using the [Azure CLI for authentication with User context](./guides/auth_app_reg_user.md).
- **Service Principal**: Not all Fabric resources support Service Principals yet. For Provider evaluation, we recommend using the [Azure CLI for authentication with User context](guides/auth_app_reg_user.md).

## Contributing

Expand Down

0 comments on commit 0205923

Please sign in to comment.