Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Introduction

We need a design confluence page for this KN BSS Integration.

1. Data flow diagrams for each of use cases.
2. Get it reviewed by leads
3. Get these flows accepted by customer and third-parties involved

Once these are done, development team can start working on the Epic

Ticket:

Jira Legacy
server24i
serverIdde9265ec-7df1-3171-8c6c-74fc0056a720
keyBPLAT-7116

Overview of BSS integration

Phase 1: No integration, users are provisioned through CMS

Phase 2: NetAdmin will provision users through an API as part of the vending process

Resources

KN ITV Channel configurations v1.5.xlsx

Table of Contents



Big picture

User Stories - business integration

New User buys new STB

  1. User go to KN store and buy a new STB
  2. NetAdmin then provision new user
  3. NetAdmin then link the STB to that user
  4. User go home and turn on the new STB
  5. STB uses the key included in the firmware to sign a JWT that includes the STB serial number as a "sub" claim
  6. Move API compares the serial number to the list of users set up in step 3

Existing User buys new STB

  1. User go to KN store and buy a new STB
  2. NetAdmin then link the STB to the existing user account
  3. Optionally, NetAdmin unlinks the old STB
  4. User go home and turn on the new STB
  5. STB uses the key included in the firmware to sign a JWT that includes the STB serial number as a "sub" claim
  6. Move API compares the serial number to the list of users set up in step 3

Existing user sell his/her STB

  1. User A sells his/her STB to user B
  2. User A call KN to unlink the STB from his/her account
  3. User B call KN to link the STB to his/her account
  4. KN captures information and passes to NetAdmin to:
    1. Unlink the STB from user account A
    2. Link the STB to user account B
  5. User B turns STB on after being told the linking is complete
  6. STB uses the key included in the firmware to sign a JWT that includes the STB serial number as a "sub" claim
  7. Move API compares the serial number to the list of users set up in step 3 and finds user B


Use case diagrams

Create new user

(info) This will only be done in Phase 2.  In Phase 1 users will be manually provisioned through

This API is used to add a new user account. Following rules apply:

  • Email address or customer-id should not belong to any customer that is not in DELETED state; otherwise API will return an error.
  • If the user with that email exists in DELETED state and his grace period is not expired, his previous registration state is restored.
  • A new user is created in UNREGISTERED state.

Flow diagram

Code Block
themeMidnight
collapsetrue
title Create new user account

NetAdmin->Move API: POST https://boox.fi/api/management/user
Move API->NetAdmin: 200 OK


Technical details

Request

Method TypeURLAuthorization
POSThttps://boox.fi/api/management/userService (Digest Authentication)

Query Strings

Please note that M is for Mandatory and O for Optional.

ParameterM/ODescriptionValues
serviceMService to which the user belongs.String of service username. Shared separately.
emailMEmail address of the user.Email address of the user
cidMCustomer Identifier.Numeric ID linking the user to NetAdmin system
auth_pinM

Authentication PIN code.

Number with the length of 4.
e.g. 8798 
purchase_pinM

Purchase PIN code.

Number with the length of 4.
e.g. 8798 
dobOUser Date of birth in YYYY-MM-DD format.SUSPEND or ACTIVATE keywords are allowed only.

Error Codes

Error CodeDescription
1403email is missing
1405cid is missing
1406auth_pin is missing
1407purchase_pin is missing
1412Email already exists
1413CID already Exists

Link user account to STB

Flow diagram (non-technical)

Code Block
themeMidnight
collapsetrue
title Link user account to STB

note left of Amino factory
  At manufacture time
end note
Amino factory->Move API: List of STB serial numbers and keys
note right of NetAdmin:
  At sale time
end note
NetAdmin->Move API: User identity and their STB serial number


Which endpoint NetAdmin should use (technical details)

Technical details

NetAdmin will POST to https://boox.fi/api/management/stb/link_user

Request

MethodURLAuthorization
POST
https://boox.fi/api/management/stb/link_user
IP, Service (Digest Authentication)

Parameters

Please note that M is for Mandatory and O is for Optional.

ParametersM/ODescriptionValues
serviceMService to which the user belongs.String of service username. Shared separately.
serial_no
MSerial Number of STB. If device does not exists with provided serial no then it will be added.

Alpha numeric string.
e.g.  615507895162

email
MEmail address of user who is provisioned for using the STBValid email address.
e.g. john.doe@example.com 
public_keys
M

8 Public keys which will be used to authenticate the STB.


Note

Public keys are stored based on the POST body order.

So first public key is considered having key index 0.

Last public key is considered having key index 7.

key0_base64;key1_base64;...........;key7_base64 (no limit on max length).

where each public key is base-64 encoded,semicolon(;) is used between keys as separator.


chipset_idOSTB device chipset number/ID.chipset_id is a random list of characters (max 32 characters).
macOEthernet interface MAC address.mac is a random list of characters (max 18 characters).

Response

HTTP CodeResponse
200

{

	"id": "123",
	"serial_no": "DNA-STB0001",
	"user": {
		"id": "10001",
		"email": "stb_user@dnastb.com"
	}
}
400
{
  "error" {
    "code": 9,
    "text": "Access to this resource is locked to IP addresses"
  }
}
401none

Error Codes

Error CodeDescription
1414Email does not exist
1426Parameter is required
1427Invalid length of chipset_id
1428Invalid length of mac
1433STB exists and linked
1434Record already exists for value
1435STB is already assigned
1436Invalid email address format

How the user will sign in

See /wiki/spaces/BPLAT/pages/38550375 to see the process of letting the user sign in.

Entitle user to "A" package

(info) The API is documented at Channel License


Code Block
themeMidnight
collapsetrue
title Entitle user to "A" package

KN BSS->Move API: POST /user/{user_id}/relationships/channel_licenses
Move API->Irdeto: SOAP entitlement call
Irdeto->Move API: 200 OK
Move API->KN BSS: 201 CREATED

Remove user entitlement to "A" package

(info) The API is documented at Channel License

Code Block
themeMidnight
collapsetrue
title Remove user entitlement to package A

KN BSS->Move API: DELETE /user/{user_id}/relationships/channel_licenses/{channel_license_id}
Move API->Irdeto: SOAP entitlement call
Irdeto->Move API: 200 OK
Move API->KN BSS: 204 NO RESPONSE BODY