EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics
  3. KB489366: IDトークンの秘密キーを生成する方法

KB489366: IDトークンの秘密キーを生成する方法

<概要>

Strategy ONE(2024年3月)のバージョン以降、セキュリティ強化のため、IDトークンの秘密キーは、サイズが512ビット以上、RFC7158(3.2. SHA-2関数を使用したHMAC)に準拠し、Base64にエンコードされている値を指定する必要があります。

秘密キーを設定するコンポーネント、ファイル、パラメータは次とおりです。

 注)すべてパラメータの値を同一の値とする必要があります。

コンポーネント

構成ファイル

パラメータ

ヘルプ

Modeling Service

modelservice.conf

modelservice.identity_token.secret_key

Modeling Service Configuration Properties

Library Web

configOverride.properties

identityToken.secretKey

MicroStrategy Library Server Configuration Properties

MicroStrategy Web

 

 

How to Enable Seamless Login Between Web and Library

Collaboration Service

config.json

secretKey

Collaboration Server Configuration Properties

 

<影響>

下記の操作をする際にエラーが発生する可能性があります。

Strategy ONE(2024年3月)以前のバージョンをご利用いただいており、Strategy ONE(2024年3月)以降のバージョンにアップグレードされた場合は、再度、値を生成して、設定いただく必要があります。

  • Strategy Library でレポートを作成、編集、実行する操作
  • Workstationでオブジェクト(スキーマオブジェクト、メトリック、プロンプトなど)を編集する操作

<対処方法>

当該ナレッジでは、スクリプトを用いて秘密キーを生成する手順を記載しています。(※生成した値を上表のパラメータで指定します。)

 

<生成手順>

値の生成は、Workstationを利用して下記のPythonスクリプトを実行し行います。

1.下記スクリプトをテキストファイルにコピーし、「generate_token.py」の名称で保存します。

  • Workstationを起動している端末上で保存ください。
import os

import base64

import platform

def generate_token():

    # Generate 64 bytes of random data (512 bits)

    random_bytes = os.urandom(64)

    # Encode the random bytes using base64

    encoded_token = base64.b64encode(random_bytes)

    # Convert bytes to string

    token = encoded_token.decode('utf-8')

    return token

def main():

    token = generate_token()

    print("Generated Token:", token)

if __name__ == "__main__":

    main()

2. Workstationを起動して、環境へ接続します。

KB489366_1.jpg

3. Workstationの左のパネルから「スクリプトの横の⊕」をクリックし、環境を選択します。

KB489366_2.jpg

4. [新規スクリプト]画面中央のファイルを選択から1で保存した「generate_token.py」を選択して、開きます。

KB489366_3_0.jpg

5. スクリプトが表示されたら、Run(実行)を押下します。

KB489366_3.jpg

6. 画面下のコンソールにトークンが表示(※赤枠部分)されます。

KB489366_4.jpg

7. 生成したトークンの値を各コンポーネントのパラメータに設定します。

設定の詳細は、各コンポーネントのヘルプを参照ください。

設定例:Library

KB489366_5.jpg

設定例:Modeling Service

KB489366_6.jpg

Comment

0 comments

Details

Knowledge Article

Published:

April 14, 2026

Last Updated:

April 14, 2026