メインコンテンツまでスキップ

Service - 서비스 생성

회사에서 SHIELDrive 서비스를 사용하기 위해 사용한다.

  1. 인증/인가 서비스에 SHIELDrive을 생성한다.
  2. 서비스 사용을 위해 연관 서비스의 BuiltIn 정책을 등록한다.
  3. SHIELDrive 서비스에 해당 회사가 서비스 시작했음을 알리는 Notify 를 발생시킨다.

멱등성을 제공하므로 실패 시 원인 분석 후 재요청을 통해 서비스 생성 완료 가능


동작 플로우

  1. 앱서비스 설치

    a. 해당 태넌트에 SHIELDrive 앱서비스가 설치되어 있는지 확인

    a-1. 이미 설치 되어 있을 경우 해당 정보를 사용 a-2. 설치되어 있지 않을 경우 신규 설치

  2. 빌트인 정책 업데이트

    a. 해당 태넌트의 빌트인 정보 조회

    b. cssb, teams-event-collector, shieldrm-broker 용 빌트인 정책 각각 업데이트

  3. notify 설정 업데이트

    a. 해당 태넌트의 SHIELDrive 앱서비스 조회

    b. 앱서비스에 notifyBaseURL 정보가 등록되어 있는지 확인

    b-1. notifyBaseURL 가 이미 등록되어 있을 경우 업데이트 진행 안함 b-2. notifyBaseURL 가 없을 경우 업데이트 진행

    c. 앱서비스 정보 업데이트 시 notify 전송이 실패될 경우 notifyBaseURL 초기화하고 오류 리턴


Method

POST

{{url}}/api-directory/service

Request Headers

KEYVALUE
AuthorizationSecurity365 CLIENT_CREDENTIALS_JWT 토큰

Request Body (json)

KEYOBJECTDESC
userIdString관리자 아이디 (필수)
companyIdString회사 extra (필수)
companyNameString회사명
clientIdString공용 MS SHIELDrive App client id (필수)
secretString공용 MS SHIELDrive App client secret (필수)
targetAzureTenantIdStringMS 태넌트 id, MS를 사용하는 고객사의 경우 (필수)
teamsAppIdString고객사에 설치된 SHIELDrive Teams App Id, MS를 사용하는 고객사의 경우 (필수)
azureShieldrmCloudMipLabelGuidStringMIP 라벨 아이디, MIP 사용하는 고객사의 경우 (필수) - 대표 라벨인거 같은데 추후 SHIELDRM을 통해 처리한다면 필요없어질듯
azureShieldrmCloudMipUnprotectLabelGuidStringMIP 해제 라벨 아이디, MIP 사용하는 고객사의 경우 (필수) - 대표 라벨인거 같은데 추후 SHIELDRM을 통해 처리한다면 필요없어질듯
googleServiceaccountJsonkeyString구글 드라이브 연동을 위한 키, Google을 사용하는 고객사의 경우 (필수)

Response Body (json)

KEYOBJECTDESC
clientIdString등록된 앱서비스 client id
clientNameString등록된 앱서비스 이름
companyIdString회사 extra
accessTokenValiditySecondsIntegeraccess 토큰 유효 시간
refreshTokenValiditySecondsIntegerrefresh 토큰 유효 시간
tokenLifetimePolicyString토큰생명 주기 설정 정책
authorizedGrantTypesList(String)앱서비스 권한 타입
useBoolean앱서비스 사용 여부
registeredRedirectUriList(String)RedirectUri
scopeList(String)권한
notifyBaseURLStringnotify 받을 서비스 url
notifyTargetList(String)notify 받을 범위
customSettingList(CustomSettingDto)설정된 커스텀값
userCustomJWTBoolean토큰내 커스텀 정보 표현 여부

Response Body CustomSettingDto (json)

KEYOBJECTDESC
settingKeyString설정 Key
settingValueString설정 Value
useboolean사용여부

Exception Response Body (json)

KEYOBJECTDESC
statusintHTTP 리턴 코드
codeint오류 코드
messageString오류 메시지

Exception Code (HTTP - 500)

CODEMESSAGEDESC
1003auth interface error인증/인가 API 연동 실패
9100failed get service information앱서비스 조회 실패
9101failed create service information앱서비스 등록 실패
9102failed update service notify information앱서비스 Notify 설정 업데이트 실패
9110failed get service builtin information빌트인 정책 조회 실패
9111failed update service builtin information빌트인 업데이트 실패

Sample

REQUEST

{
"userId": "user1@socam.info",
"companyId": "3CJ55MSE-xLO7Sxt4-qUBKzbcs-XP2cgGEq",
"companyName": "소프트캠프-개발",
"clientId": "clientId-clientId",
"secret": "secret-secret",
"targetAzureTenantId": "tenant-tenant",
"teamsAppId": "teams-teams",
"azureShieldrmCloudMipLabelGuid": "mip-guid",
"azureShieldrmCloudMipUnprotectLabelGuid": "mip-unprotect-guid",
"googleServiceaccountJsonkey": "user1@socam.info"
}

RESPONSE - Success

{
"clientId": "77077125-34b4-4de0-8ed3-780bbc329ea8",
"clientName": "SHIELDrive",
"companyId": "JATGcG1v-nXSVFL2A-SzPJwY6X-A6sv7vYy",
"accessTokenValiditySeconds": 3600,
"refreshTokenValiditySeconds": 7776000,
"tokenLifetimePolicy": "token_lifetime_until_revoke",
"authorizedGrantTypes": [
"refresh_token",
"authorization_code"
],
"use": true,
"registeredRedirectUri": [
"https://devshieldrive.softcamp.co.kr/api-directory/auth/callback/JATGcG1v-nXSVFL2A-SzPJwY6X-A6sv7vYy"
],
"scope": [
"read"
],
"notifyBaseURL": "http://shieldrive-directory.dev.svc.cluster.local/api-directory/company",
"notifyTarget": [
"company",
"client",
"user",
"group"
],
"customSetting": [],
"userCustomJWT": false
}

RESPONSE - Exception

{
"status": 500,
"code": 9101,
"message": "failed create service information"
}