Enforcing Basic Credential Mapping
Map credentials for different types of users by enforcing the Basic Credential Mapping Policy.
First, create and configure new policy. Next, associate the policy, with an activity or a binding in your application.
Setting Up a Policy with Resources
- In the
Project Explorer, right-click the
Policies folder and select
New > Policy.
The Policy Wizard opens.
- Specify the following values in the Create New Policy Window:
- Policy Folder: Name of the folder where policies will be located.
- Package: Name of the package in the module where the new policy is added. Accept the default package, or browse to select a different package name.
- Policy Name: Name of the new policy. By default, the policy name is configured to match the security policy you choose.
- Under Select the type of Policy, select Basic Credential Mapping.
- From the
Policy Defaults drop-down menu, select one of the following options:
Note: The Policy Defaults menu offers a list of commonly used policy configurations to choose from. After you select a Policy Default, a policy with preconfigured settings and related resources is created. If resources already exist in the module, the newly created policy automatically refers them. However, if no resources exist, new resources with default settings are created and referred to by the policy. Refer to the Default description at the bottom of the Policy Wizard to view policy configurations and new resources that might be created.
- Fixed Credentials: Select this option to ensure a fixed set of credentials are mapped for all users. A new Basic Credential Mapping policy configured for Fixed Basic Credential Mapping and the following resource is produced in your workspace:
- Authenticated & Anonymous Users : Select this option to enforce Basic Credential Mapping for authenticated users and anonymous users. A new Basic Credential Mapping policy configured for conditional basic credential mapping and the following resources are produced in your workspace:
- Role Based Credentials: Select this option to enforce basic credential mapping for authenticated users with roles. A new Basic Credential Mapping policy configured for conditional basic credential mapping and the following resources are produced in your workspace:
- An Identity Provider resource for authenticated users with the default file name BasicCredentialMapping_AuthIdentityProvider.userIdResource
- Two separate Identity Provider resources for authenticated users with roles. The default file names of the resources are BasicCredentialMapping_RoleIdentityProvider.userIdResource and BasicCredentialMapping_RoleIdentityProvider1.userIdResource
- Empty Policy (No Default) : Select this option to create a new Basic Authentication policy with no preselected options and no resources.
- Optional. Select Always create new shared resources to ensure new resources are generated for the policy and referred to by the policy.
- Optional. Select Create module properties for common fields to override default properties in newly created resources with module properties. Resources with module properties for common fields are generated after you select this option.
- Select Finish to create the policy.
Configuring Resources and the Policy
Refer to the topic "Basic Credential Mapping", under "Policy Resources" in the Bindings and Palettes guide for policy configuration details.
Associating the Policy with an Activity or a Binding
Refer to Associating Policies for instructions on enforcing a policy on an activity or a binding in your application.