2012년 7월 16일 월요일

SharePoint 서비스 계정은 어떤 걸 사용해야 하나?

SharePoint라는 제품이 팜을 이루어 여러대의 머신에서 동작 하는 솔루션이다 보니 Setup시에 서비스용 계정들을 설정해야 하는 경우가 생깁니다.
처음으로 SharePoint를 설치 하는 분들의 경우엔 솔루션의 특성을 이해 하고 진행 하기 보단 일단 Setup을 해보고 설치 결과를 보고 싶어 하는 성향이 많아서 일단 Setup.exe를 돌리고 보는데요 ㅎㅎ - 이런 경우엔 "단독 실행"으로 설치 하시는 게 가장 효과적입니다.-

오늘은 기본으로 돌아가 SharePoint Setup에 필요한 계정에 대해서 확인해 보도록 하겠습니다.
SharePoint 설치를 제대로 하기 위해서는 다음과 같은 계정과 권한이 Active Directory, SQL Server, SharePoint 멤버 서버에 필요 합니다.

아래에 나오는 계정의 이름은 제가 임의로 결정한 것입니다. 계정의 이름 규칙이 있다면 적절히 바꿔 사용 하시면 됩니다.


SQL Server 서비스 계정 : SVC_SQL
SQL서버 서비스를 돌리는 계정입니다. SQL 서비스 계정을 다른 Windows서비스와 같이 System, Network Service, Local System 계정으로 돌릴 수 있지만 명시적으로 도메인 계정을 사용 하는 게 좋습니다. SharePoint서버와 다른 서버에서 SQL 서버가 돌아간다면 도메인 계정을 필수로 사용해야 합니다.


Setup 사용자 계정(사람) : SP_Admin
SharePoint 설치 패키지를 실행해서 SharePoint를 깔고 설정을 할 사람이 사용할 계정입니다.
Setup이 진행되는 동안 SQL database에 접근 하고 설치 하는 서버에 로컬 그룹을 만들기도 합니다. 그래서 SP_Admin계정은 SQL서버에 securityadmin과 dbcreator 권한이 있어야 하고 설치 하는 서버의 로컬 Administrators 그룹에 속해 있어야 합니다. 이 작업은 자동으로 되지 않기 때문에 SQL 서버에서 직접 권한을 할당하고 로컬 Administrators에다 넣어 줘야 합니다. 한가지 중요한 점은 Domain Admins 같은 도메인의 최고 권한이 필요 한 것이 아니라는 점입니다. 도메인 그룹은 Domain Users 그룹에만 있어도 됩니다.


Server Farm 계정 : SP_Farm
설치가 진행되는 동안 SP_Admin 계정으로 SharePoint 팜을 만들게 되는 데 이 팜은 SQL 서버의 DB형태로 만들어 집니다. 설치 이후 SharePoint가 SQL서버의 SharePoint 팜 database에 접근할 때 사용하는 서비스 계정이 SP_Farm입니다. 주로 중앙관리 사이트를 통해 이루어 지는 대부분의 작업이 이 서비스 계정을 통해 접근 하게 됩니다. IIS의 SharePoint 중앙관리 사이트 application pool 의 identity로 설정 되고 SharePoint Timer 서비스 계정도 이 계정으로 설정됩니다. SharePoint 가 깔리는 모든 서버의 로컬 Administrators 그룹에 이 SP_Farm 계정이 포함 되어 있어야 합니다.
이 작업은 "SharePoint 제품 설정 마법사(SharePoint Products Configuration Wizard)"가 설치 이후 돌아 갈 때 자동으로 됩니다.


웹 응용프로그램과 서비스 응용프로그램 Application Pool 계정 : SP_Service
각 웹 응용프로그램은 IIS의 application pool에서 돌아 가게 되는데 이 application pool의 identity가 SP_Service 같은 도메인 사용자 계정입니다. 이 계정은 SQL Server의 SharePoint content database 에 접근 할 때 사용 됩니다.
Office Web App이나 Search같은 서비스 응용프로그램도 웹 응용프로그램의 일종으로써 도메인 사용자 계정이 설정된 application pool에서 돌아가게 됩니다. 사용된 계정은 SharePoint 응용프로그램이 만들어 질 때 권한이 자동으로 할당 되게 됩니다.


검색 Crawler (indexer) 계정 : SP_Crawl
검색 Crawler 계정은 SharePoint 콘텐츠를 인덱싱 하는데 사용됩니다. 이 계정은 모든 SharePoint 콘텐츠에 "모두 읽기" 권한이 부여 됩니다. 만약 검색 원본이 SharePoint 콘텐츠가 아니라 공유 폴더 같은 경우엔 SP_Crawler 계정에 읽기 권한을 수동으로 할당 해 줘야 합니다.


사용자 프로필 동기화 계정 : SP_Sync
SharePoint 사용자 프로필 동기화 서비스는 Active Directory와 SharePoint간에 프로필 속성을 동기화 하는데 사용됩니다. 이 계정은 계정 정보를 읽어 올 때 도메인 수준에서 "디렉터리 변경 사항 복제(Replicate Directory Changes)" 권한이 필요 합니다. 그리고 이 서비스 계정이 팜 관리자 그룹이나 사용자 프로필 동기화 관리자 그룹에 들어 있어야 합니다.
만약 도메인의 NETBIOS이름과 도메인 이름이 다르다면 cn=configuration 컨테이너에도 "디렉터리 변경 사항 복제" 권한이 필요 합니다.
그리고 만약 SharePoint 서버에서 AD로 사용자 사진 속성을 AD의 ThumbnailPhoto같은 속성으로 overwrite해야 한다면 해당 AD개체의 ThumbnailPhoto에는 read권한 밖에 주어지지 않으므로 명시적으로 write권한을 추가 해 줘야 합니다.

이렇게 SharePoint 2010 에서 사용되는 계정을 정리 해 보았습니다. 뭐 Domain Admins에 들어 있는 계정 하나 만들어서 몽땅 그 계정 하나로 설정 해 버리면야 문제가 없어 보이긴 합니다만… 첫 번째 보안에 위험 하겠지요. 두 번째로는 그 계정 하나가 문제가 발생하면 SharePoint 전체 서비스가 중단되는 사태가 벌어 질 수도 있을 것입니다.
정확히 SharePoint 서비스가 어떤 작업을 하는지 확인하고 어떤 계정이 어떤 권한을 가져야 하는지 확인이 필요 할 것입니다.

2011년 4월 4일 월요일

Your search cannot be completed because this site is not assigned to an indexer.

증상

Search 서비스에 API를 통해 검색을 할 때 제목과 같은 에러가 발생 하는 경우 입니다.

image

원인

Search설정에는 문제없이 되는 것 처럼 보이는데요 이럴 땐 일단 Conent DB의 Search 서버 설정이 제대로 되어 있는지 확인 해야 합니다.

해결

Central Administratoion > Application Management > Manage content database >

image

만약 “Searh Server” 설정이 비활성화 되어 있으면 Central Administration > System Settings > Manage services on server 에서 SharePoint Foundation Help Searh 서비스가 제대로 시작되어 있는지 확인 해 보시기 바랍니다.

2011년 4월 3일 일요일

Field Name, InternalName, StaticName, DisplayNane, _x0020_

Custom Field정의에 대해서 알아 보겠습니다.

Custom Field를 정의 할 때 필수 attribute는 Name, Type, ID 입니다.

ID는 “{}”로 둘러 싸인 GUID값이고, Type은 SharePoint에서 사용 가능한 Type입니다.

MSDN의 File element reference

<Field ID="{1511BF28-A787-4061-B2E1-71F64CC93FD5}"
Name="DateOpened"
DisplayName="Date Opened"
Type="DateTime"
Format="DateOnly"
Required="FALSE"
Group="Financial Columns">
<Default>[today]</Default>
</Field>

Field를 customize할 때 가장 유의 해야 할 부분은 바로 Name 속성입니다.


Name


Name은 SPField 개체를 통해 InternalName 속성로 노출 하는 값으로써 Site내에서 Unique 하고 0-9 숫자와 알파벳 글자만을 사용 할 수 있습니다. 만약 다른 캐릭터가 오면 _x0000_ 형태로 인코딩을 해버립니다. 즉, “File Type” 이라는 이름은 “File_x0020_Type”으로 바꾸는 것이죠. 이건 한글 필드이름일 때는 더욱 문제가 됩니다. 디코딩을 해보기 전까지는 전혀 어떤 글자인지 모를 이름이 “InternalName”에 들어가 있는 것입니다. 그리고 마지막으로 주의해야 할 것은 이름의 글자수가 32자리 라는 것입니다. 이상 넘어가는 글자는 그냥 잘라 먹습니다.


StaticName


StaticName은 별도로 지정하지 않으면 Name 값이 동일하게 들어 갑니다. InternalName은 읽기 전용이라 field 생성 후 변경이 불가능 하지만 이 StaticName은 API를 통해 변경이 가능합니다. 이 속성은 SPFieldCollection.GetField()  메서드에서 해당 field를 찾아 올 때 InternalName과 함께 사용 할 수 있습니다.


image


DisplayName


DisplayName은 UI에서 노출 되는 field 이름입니다. 당연히 공백을 포함 모든 캐릭터를 사용 할 수 있습니다.


결론


Name 속성은 무조건 공백없는 알파벳, 숫자로 만들어야하고 32자를 넘지 말아야 합니다. StaticName은 별도록 지정 말고 Name과 같이 사용하는 것이 좋습니다.

2011년 4월 1일 금요일

the field with ID defined in feature was found in the current site collection or in a sub site

증상

VS에서 Field를 배포 하려 할 때 첫번째엔 문제가 없는데 두번째 부터 아래와 같이 에러가 나면서 Feature Activation에 실패 하는 경우가 있습니다.

‘Error occurred in deployment of step ‘Activate Features’: the field with ID <New GUID> defined in feature <FeatureGUID> was found in the current site collection or in a sub site.

원인

원인은 Field 선언시에 ID값을 선언 할 때 "{}” 로 둘러 싸지 않아서 그렇습니다.

<Field ID="A409C79A-F1C3-43B9-A602-160FF81E0AF8" Name="UserID" Type="Text" />
VS의 버그에 가깝습니다.

해결

해결 책은 일단 ID값을 “{}”로 감싸고 해당 솔루션 패키지를 Retract(취소)한 후 VS를 다시 켠 후 다시 Deploye(배포) 하면 해결 됩니다.

참고

http://support.microsoft.com/kb/2022443

2011년 2월 9일 수요일

SharePoint 2010 Form Based Authentication 및 Custom Login Page

SharePoint 2010 에서 FBA를 구성 하는 방법과 Custom Login Page를 만드는 방법을 정리 해 봤습니다.

1. 중앙 관리 사이트 Membership, Role Provider설정하기

중앙 관리 사이트 web.config 파일을 열어 아래와 같이 추가 하여 수정한다.

<configuration />안쪽에

<connectionStrings>

<add name="SQLConnectionString" connectionString="data source=SQLServerName;Integrated Security=SSPI;Initial Catalog=aspnetdb" />

</connectionStrings>

<system.web></system.web> 사이에

<roleManager defaultProvider="AspNetWindowsTokenRoleProvider" enabled="true" cacheRolesInCookie="false">

<providers>

<add connectionStringName="SQLConnectionString" applicationName="/" description="Stores and retrieves roles from SQL Server" name="SQL-RoleManager" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

</providers>

</roleManager>

<membership defaultProvider="SQL-MembershipProvider">

<providers>

<add connectionStringName="SQLConnectionString" passwordAttemptWindow="5" enablePasswordRetrieval="false" enablePasswordReset="false" requiresQuestionAndAnswer="true" applicationName="/" requiresUniqueEmail="true" passwordFormat="Hashed" description="Stores and Retrieves membership data from SQL Server" name="SQL-MembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

</providers>

</membership>

아래와 같이 "PeoplePickerWildcards" 노드를 찾아 추가한다.

<PeoplePickerWildcards>

<clear />

<add key="AspNetSqlMembershipProvider" value="%" />

<add key="SQL-MembershipProvider" value="%" />

</PeoplePickerWildcards>

2. Security Token Service Membership, Role Provider설정하기

STS서비스의 web.config 파일은

%programfiles%\common files\Microsoft Shared\web server extensions\14\WebServices\SecurityToken 에 있음.

<configuration />안쪽에

<connectionStrings>

<add name="SQLConnectionString" connectionString="data source=SQLServerName;Integrated Security=SSPI;Initial Catalog=aspnetdb" />

</connectionStrings>

<system.web>

<roleManager defaultProvider="c" enabled="true" cacheRolesInCookie="false">

<providers>

<add name="c" type="Microsoft.SharePoint.Administration.Claims.SPClaimsAuthRoleProvider, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />

<add connectionStringName="SQLConnectionString" applicationName="/" description="Stores and retrieves roles from SQL Server" name="SQL-RoleManager" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

</providers>

</roleManager>

<membership defaultProvider="i">

<providers>

<add name="i" type="Microsoft.SharePoint.Administration.Claims.SPClaimsAuthMembershipProvider, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />

<add connectionStringName="SQLConnectionString" passwordAttemptWindow="5" enablePasswordRetrieval="false" enablePasswordReset="false" requiresQuestionAndAnswer="true" applicationName="/" requiresUniqueEmail="true" passwordFormat="Hashed" description="Stores and Retrieves membership data from SQL Server" name="SQL-MembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

</providers>

</membership>

</system.web>

3. ASPNET Membership DB설치

1. SharePoint 2010 서버에서 명령 프롬프트를 연다.

2. C:\Windows\Micrsooft .Net\Framework64\v2.0.50727 폴더로 이동

3.  “aspnet_regsql.exe” 실행. 실행 하면 아래와 같은 마법사가 나옴.

clip_image002

clip_image004

Database 이름을 <default>로 놓고 진행하면 "aspnetdb" 라는 멤버쉽 db가 생성됨.

4. Aspnetdb에 SharePoint Service Application Pool 계정이 읽고 쓰기 권한을 할당 함.

clip_image006

4. Web Application 생성

Form Based Authentication을 지원하는 Web Application을 아래와 같이 생성한다.

1. 중앙 관리사이트를 연다.

2. 응용프로그램 관리 아래의 웹 응용프로그램 관리 클릭

3. 리본 메뉴의 "new" 클릭

4. 페이지 상단 Claims based Authentication 선택

a. Claims Based Authentication 선택

clip_image007[6]

a. Host Header와 Port 지정

clip_image009

c. 익명 인증 설정

clip_image010[6]

d. \Membership Provider와 Role Provider 이름 설정

clip_image012

e. Custom Sign In Page 지정

clip_image013[6]

f. Contents Database이름 변경

clip_image014[6]

g. Save를 눌러 실행한다.

clip_image015[6]

5. 사이트 모음 생성하기.

a. 앞서 실행 결과 화면에서 "Create Site Collection"을 클릭

clip_image017

b. 창을 닫았다면 응용 프로그램 관리 클릭 후 사이트 모음 생성 클릭

clip_image018[6]

c. 웹 응용프로그램 선택 확인

clip_image019[6]

d. 사이트 제목과 템플릿 지정

clip_image021

e. 사이트 관리자 지정

clip_image023

f. OK버튼을 눌러 생성완료

clip_image024

5. 생성된 Web Application web.config 수정

C:\inetpub\wwwroot\wss\VirtualDirectories\ 아래에서 생성한 Web Application 폴더내의 web.config 파일을 연다.

clip_image026

<configuration />안쪽에

<connectionStrings>

<add name="SQLConnectionString" connectionString="data source=SQLServerName;Integrated Security=SSPI;Initial Catalog=aspnetdb" />

</connectionStrings>

<system.web></system.web> 사이에

<roleManager defaultProvider="c" enabled="true" cacheRolesInCookie="false">

<providers>

<add name="c" type="Microsoft.SharePoint.Administration.Claims.SPClaimsAuthRoleProvider, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />

<add connectionStringName="SQLConnectionString" applicationName="/" description="Stores and retrieves roles from SQL Server" name="SQL-RoleManager" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

</providers>

</roleManager>

<membership defaultProvider="i">

<providers>

<add name="i" type="Microsoft.SharePoint.Administration.Claims.SPClaimsAuthMembershipProvider, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />

<add connectionStringName="SQLConnectionString" passwordAttemptWindow="5" enablePasswordRetrieval="false" enablePasswordReset="false" requiresQuestionAndAnswer="true" applicationName="/" requiresUniqueEmail="true" passwordFormat="Hashed" description="Stores and Retrieves membership data from SQL Server" name="SQL-MembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

</providers>

</membership>

아래와 같이 "PeoplePickerWildcards" 노드를 찾아 추가한다.

<PeoplePickerWildcards>

<clear />

<add key="AspNetSqlMembershipProvider" value="%" />

<add key="SQL-MembershipProvider" value="%" />

</PeoplePickerWildcards>

Command Prompt에서 IISRESET 이후 사이트를 연다.

clip_image028

clip_image030

clip_image032

2011년 1월 16일 일요일

Web Part Error: UnsafeControlException

WebPart Provisioning이 잘 되지 않고 아래와 같은 에러가 화면에 나오는 경우가 있습니다.

 
 

Web Part Error: A Web Part or Web Form Control on this Page cannot be displayed or imported. You don't have Add and Customize Pages permissions required to perform this action.

Hide Error Details

[UnsafeControlException: A Web Part or Web Form Control on this Page cannot be displayed or imported. You don't have Add and Customize Pages permissions required to perform this action.]

  at Microsoft.SharePoint.WebPartPages.WebPartImporter.CreateWebPart(Boolean clearConnections)

  at Microsoft.SharePoint.WebPartPages.WebPartImporter.Import(SPWebPartManager manager, XmlReader reader, Boolean clearConnections, Uri webPartPageUri, SPWeb spWeb)

  at Microsoft.SharePoint.WebPartPages.SPWebPartManager.CompressWebPartNoSave(Boolean isClosed)

 
 

원인은 Anonymous가 설정 된 사이트인 경우 사이트 최초 시작 시에 anonymous로 바로 연결 하게 되면 WebPart Page내에 Provisioning된 webpart를 제대로 불러오지 못해서 그런 것 같습니다.

사이트 편집권한이 있는 사용자로 로그인 후 다시 anonymous로 접근하면 해결 되더군요.

2010년 8월 19일 목요일

User Profile 관련 Hotfix가 나왔습니다.

User Profile 관련해서 설정과 작동에 버그가 좀 있는 것 같았는데요.. 다행히 hotfix가 나왔네요.

http://support.microsoft.com/kb/983497/  ->기본적으로 한글로 번역기가 돌려 보여줍니다. 번역 품질이 쪼금 떨어지네요

http://support.microsoft.com/kb/983497/en-us  –> 영문