Claims-Based Authentication – Lab Sharepoint 2016 Phần 24

Ở bài lab trước, các site đều sử dụng Windows authentication. Trong bài lab này, sẽ hướng dẫn cách tạo site sử dụng Claims-Based Authentication, để chứng thực cho các user không có trong Active directory.

Các Bước Triển Khai Claims-Based Authentication:

Bài LAB này được thực hiện theo các bước sau:

  • Register managed Account.
  • Tạo site sử dụng Claims-Based authentication.(ext.labs.ctl.vn)
  • Tạo Host A.
  • Tạo Database.
  • Tạo User trong SQL server.
  • Add và Install Fram Solution.
  • Triển khai và cấu hình Form-base authentication.
  • Tạo FBA User và cấp quyền.
  • Kiểm tra.

Sau khi hoàn thành bài lab, các bạn có thể tạo và sử dụng site dùng Claims-Based Authentication.

Thực Hiện Claims-Based Authentication:

B1: Register managed Account:

B1: Register managed Account:

Vào Central administration, chọn Security Configure managed accounts.

Claims-Based Authentication

Chọn Register managed Account

Claims-Based Authentication

Nhập User name : CTL\UserDB. Password, check vào Enable Automatic password change Ok

Claims-Based Authentication

Đăng ký manage Account xong.User xong

picture007

B2. Tạo site sử dụng Claims-Based authentication.(ext.labs.ctl.vn):

B2. Tạo site sử dụng Claims-Based authentication.(ext.labs.ctl.vn):

Vào Central Administration Chọn Application Management Manage web applications

picture009

Chọn New

picture002

Port:80, Host Header: Ext.labs.ctl.vn

picture013

Check vào Enable Forms Based Authentication(FBA),ASP.NET Membership provider name: FBA, ASP.NET Role Manager name: FBARole

picture014

Chỉ định user: CTL\UserDB (user này đã được register ở bước 1),

Database name: WSS_Content_ext OK

picture015

Chờ vài phút, chọn Create Site Collection. Title: Trang Chu, Template: Team Site

picture018

Template: Team Site

picture019

User name: CTL\administrator và ctl\UserDB Ok. Chờ vài phút OK

picture020

B3. Tạo Host A.

B3. Tạo Host A.

Vào DNS, phải chuột vào labs.ctl.vn chọn New Host A

picture023

Name: EXT và Ip:Ip của sharepoint server add Host

picture026

Sau đó vào trình duyệt vào site http://ext.labs.ctl.vn sẽ có giao diện sau:

picture010

B4. Tạo Database.

B4. Tạo Database.

Vào c:\windows\Microsoft.NET\Framework64\V4.0.30319 chạy file Aspnet_Regsql

picture053

Màn hình welcome next

picture012

Chọn option Cofigure SQL Server for application services next

picture013

Database name: ExternalDB Next

picture014

Màn hình confirm your settings next

picture015

ấn finish hoàn tất tạo database

picture016

B5. Tạo User trong SQL server.

B5. Tạo User trong SQL server.

Vào Microsoft SQL server management studio. Server name: ser100(PC cài SQL server) Connect. Trong Databases chọn ExternalDB Security, phải chuột vào User chọn New User…

User type: chọn Windows user. User name: CTL\UserDB,

Login name: CTL\UserDB

picture060

Chọn membership và chọn các checkbox như trong hình OK, tạo user xong

picture061

User ctl\UserDB vừa tạo.

picture063

B6. Add và Install Fram Solution:

B6. Add và Install Fram Solution:

Copy các file FBAConfigFeature.wsp, FBAConfigMgr.exe, Activate.ps1, Deploy.ps1, UnDeploy.ps1, và file Visigo.Sharepoint.FormsBasedAuthentication.wsp và thư mục gốc đĩa C: ( các file này có trong folder Day 6, module 24).

Vào Sharepoint 2016 Management Shell thực thi lệnh:

add-spsolution -LiteralPath “C:\FBAConfigFeature.wsp”

picture027

Và lệnh: install-spsolution -Identity fbaconfigfeature.wsp -GACDeployment

picture028

Thực thi lệnh set-ExecutionPolicy unrestricted (để có thể thực thi các file tiếp theo)

picture031

Đứng tại thư mục góc c: thực thi lệnh:

.\Deploy.ps1 http://ext.labs.ctl.vn và ấn R khi có yêu cầu, lưu ý các file thực thi.

picture046

Thực thi lệnh xong.

picture047

Sau đó vào Central administration, chọn System Settings Manage farm solutions

picture049

Kiểm tra có các thông tin sau:

picture050

B7. Triển khai và cấu hình Form-base authentication:

B7. Triển khai và cấu hình Form-base authentication:

Vào C: thực thi file FBAConfigMgr.exe trong phần Web Application URL:http://ext.labs.ctl.vn. Trong phần Sample configuration: chọn People Picker Wildcard, trong phần People Picker Wildcard sửa thông tin như trong hình

picture001

Trong phần Sample configuration: chọn SQL Connection String sửa các thông tin như trong hình.

picture002

Trong phần Sample configuration: chọn SQL Role và sửa các thông tin như trong hình

picture003

Trong phần Sample configuration: chọn SQL Member và sửa các các thông tin như trong hình Ấn nút Apply Config xong

picture004

B8. Tạo FBA User và cấp quyền:

B8. Tạo FBA User và cấp quyền:

Vào site ext.labs.ctl.vn bằng quyền system account, vào setting site settings chọn Site collection features

Claims-Based Authentication

Kiểm tra xem Forms Based Authentication Management đã Active chưa.

Claims-Based Authentication

Trở lại site settings, chọn FBA User Management

Claims-Based Authentication

Chọn new User

Claims-Based Authentication

Nhập các thông tin cần thiết

Claims-Based Authentication

User vừa tạo xong.

Claims-Based Authentication

Trở về Site Settings chọn people and groups

Claims-Based Authentication

Cấp cho Kh1, kh2 thuộc group Member cấp quyền xong

Claims-Based Authentication

B9. Kiểm tra:

B9. Kiểm tra:

Truy cập vào site http://ext.labs.ctl.vn chọn Forms Authentication

Claims-Based Authentication

Đăng nhập bằng quyền của Kh1 Thành công

Claims-Based Authentication

Hoàn tất bài lab.

Mr CTL – labs.ctl.vn

Lab Sharepoint 2016

Leave a Reply