查找

Digest
· Feb 17

Publications des développeurs d'InterSystems, semaine Février 10 - 16, 2025, Résumé

Articles
Annonces
#InterSystems IRIS
#IRIS contest
#Communauté des développeurs officielle
Février 10 - 16, 2025Week at a GlanceInterSystems Developer Community
Digest
· Feb 17

InterSystems Developers Publications, Week February 10 - 16, 2025, Digest

Articles
#InterSystems IRIS
Using SQL Gateway with Python, Vector Search, and Interoperability in InterSystems Iris - Part 1 - SQL Gateway
By Julio Esquerdo
Using SQL Gateway with Python, Vector Search, and Interoperability in InterSystems Iris - Part 2 – Python and Vector Search
By Julio Esquerdo
Using SQL Gateway with Python, Vector Search, and Interoperability in InterSystems Iris - Part 3 – REST and Interoperability
By Julio Esquerdo
Getting Started Using Istio Service Mesh with Mirrored IRIS Environment in Kubernetes
By Ariel Glikman
A look at Dynamic SQL and Embededd SQL
By Andre Larsen Barbosa
Using REST API, Flask and IAM with InterSystems IRIS - Part 1 - REST API
By Julio Esquerdo
Using REST API, Flask and IAM with InterSystems IRIS - Part 2 – Flask App
By Julio Esquerdo
Using REST API, Flask and IAM with InterSystems IRIS - Part 3 – IAM
By Julio Esquerdo
Having trouble with your IRIS instance after installing it on Linux? Filecheck to the rescue!
By Luis Angel Pérez Ramos
Back to Basics: Why InterSystems?
By Daniel Cole
HTTP and HTTPS with REST API
By Julio Esquerdo
#InterSystems IRIS for Health
#Other
Announcements
Questions
#InterSystems IRIS
#InterSystems IRIS for Health
#Health Connect
#Caché
Discussions
#InterSystems IRIS
Code Golf: Clockwise Spiral
By Eduard Lebedyuk
February 10 - 16, 2025Week at a GlanceInterSystems Developer Community
Announcement
· Feb 17

学習目的に合わせた最適なラーニングパス(学習経路)を確認できるページ

皆さん、こんにちは!

これから InterSystems 製品で開発を始める/未使用の機能を確認したい/運用保守を担当する  など、担当される役割や学習目的に合わせた最適なラーニングパス(学習経路)を確認できるページを公開しました!

💡InterSystems ラーニングパス💡

学習経路に沿った学習内容(数分の解説ビデオ、対象となる日本語ドキュメント、コミュニティ記事、セルフラーニングビデオ、体験環境付き演習(英語のみ)、オンラインラーニング(英語のみ)、講師付きトレーニングコース)を確認しながらご自身のペースで学習を進めていただくことができます。

以下、ページの使い方を簡単にご紹介します。下図のように、役割毎に各種パスが用意されています。

箱をクリックすると対象となるパス一覧が表示されます(図例は Develop の箱をクリックしたときの表示です)。

パス名をクリックすると概要文とパスへのリンクが表示されます。

パスのリンクより対象のページに移動できます。開いたパスの左画面に学習経路が表示されます。パスページ内の移動にご利用ください。

 

続いて、画面の機能についてご紹介します。

画面左上のキーワード入力欄を利用してラーニングパスページ内をキーワード検索できます。

 

また、画面中央上に画面レイアウトを調整できるアイコンも用意されていて、フォントの大きさやダーク(Night)モードへの変更が行えます。

 

ラーニングパスへは、InterSystems Japan ホームページからも辿れます(画面上部「ラーニングパス」から辿れます)。

 

今後も随時情報を増やしていく予定です。

InterSystems 製品の学習に、ぜひラーニングパスをご活用ください!

Discussion (0)1
Log in or sign up to continue
Article
· Feb 17 3m read

整合性チェックの目安の時間や動作状況の確認、途中で停止する方法について

これは InterSystems FAQ サイトの記事です。
 

1. 整合性チェックの目安の時間

整合性チェックの目安の時間は、環境により異なってきます。ディスク速度やDBサイズに大きく依存してきます。

同じディスク上に置かれた比較的サイズの小さなDATでまず実施して、サイズと経過時刻からおおよその時刻を推測してください。

また、整合性チェックの方法によって要する時間が変わってきます。

詳細は参考記事で紹介しております「整合性チェックの各方法の違いについて」をご覧ください。

 

2. 動作状況(正常に稼働しているか)を確認する方法

ターミナルで整合性チェックを実行していただく場合は、現在どのデータベース/グローバルのチェックを実行しているのかを出力ログ(画面またはファイル)にて確認することが可能です。

管理ポータルで実行する場合は、整合性チェックの実行プロセスID(※PIDの確認方法)を指定して、ターミナルで以下のコマンドを実行することにより確認することが可能です。
詳細については、ドキュメント をご覧ください。

%SYS>do Display^Integrity("^IRIS.TempIntegrityOutput(2596)")  // 整合性チェック実行プロセス(2596)の場合


対象プロセス(PID)のプロセス詳細より、グローバル参照や実行されたコマンドで、稼働しているかを確認することも可能です。
 

PIDの確認は、管理ポータルから実行している場合は、バックグラウンドタスクより整合性チェックの実行プロセスIDを確認します。

[システムオペレーション] > [バックグラウンドタスク] 
※タスク名:データベース整合性チェック、PIDを確認。
 タスクスケジュールで実行の場合は、バックグラウンドタスクで確認することはできません。



実行中のプロセスが動作しているかは、対象プロセスがRead I/O を発行しているかでも確認できます。
Linuxの場合、プロセスのRead I/Oの監視は、iotop コマンドが使用可能であれば、以下のコマンドで確認できます。
※iotop:どのプロセスがI / Oが進行中であるかを示すために使用します

# iotop -p <pid>

iotop コマンドが使用できない場合は、/proc/<pid>/io をviコマンド等でご覧いただくと read_bytes にて確認できます。


Windowsの場合は、Windowsリソースモニタを使用します。

起動方法は以下のいずれかの方法になります。

  • タスクマネージャーの[パフォーマンス]タブにある[リソース モニター]ボタン
  • コントロールパネル > 管理ツール > リソースモニタのショートカット
  • perfmon.exe /res


 

3.途中で止める方法

管理ポータルのプロセス詳細より、対象プロセスを停止します。
[システムオペレーション] > [プロセス] 
上記プロセスIDの 詳細 を開き、終了 ボタンで終了します。 ターミナルで^Integrity ユーティリティを使用している場合は、Ctrl+Cで停止します。

ただし、大きなグローバルをチェックしている最中ですと、上記方法では停止できません。

その場合は、^JOBEXAMユーティリティを使用して強制的にプロセスを終了させる必要があります。


【手順】
別ターミナルで ^JOBEXAMを実行し、該当プロセスをTerminateします。

%SYS>do ^JOBEXAM
                IRIS for Windows (x86-64) 2024.1.1 (Build 347U)
 Job# NSpace  Routine        Commands   Globals State      PID Current device
:
   18 %SYS    %SYS.WorkQueueMgr 30484       839 EVTW      2596 //./nul   ← 停止したいプロセス
(N)ext,(P)rev,(G)oto,(E)xamine,(T)erminate,(S)uspend,(R)esume,(Q)uit =>  ← T を入力+Enter 
Terminate: Enter Job # or "P" followed by the PID:  ← 上記サンプルの場合 P2596 を入力+Enter


 

enlightened【ご参考】
^Integrity (^INTEGRIT) ユーティリティの使用方法
整合性チェック: 高速化と低速化
整合性チェックの各方法の違いについて

Discussion (0)0
Log in or sign up to continue
Article
· Feb 17 6m read

JWT Creation and Integration in InterSystems IRIS

What is JWT?

JWT (JSON Web Token) is an open standard (RFC 7519) that offers a lightweight, compact, and self-contained method for securely transmitting information between two parties. It is commonly used in web applications for authentication, authorization, and information exchange.

A JWT is typically composed of three parts:

1. JOSE (JSON Object Signing and Encryption) Header
2. Payload
3. Signature

These parts are encoded in Base64Url format and concatenated with dots (.) separating them.

Structure of a JWT

Header

{ "alg": "HS256", "typ": "JWT"}

Payload

{"sub": "1234567890", "name": "John Doe", "iat": 1516239022}

Signature:
The signature is used to verify that the sender of the JWT is who it says it is and to ensure that the message has not been tampered with.

To create the signature:

1. base64 Encoded header and payload.
2. Apply the signing algorithm (e.g., HMAC SHA256 or RSA) with a secret key (for symmetric algorithms like HMAC) or a private key (for asymmetric algorithms like RSA).
3. Base64Url encode the result to obtain the signature.

Sample JWT. View the content of the JWT 

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c

 

JWT Creation in IRIS

Note: Before 2024, the %OAuth2.JWT class was used for generating JWTs in IRIS. The %Net.JSON.JWT class is now the primary class for JWT creation, and I will use this class in the example code.

JWK overview

JWK represents a cryptographic key particularly for signing and verifying the JWTs. JWKs allow you to represent public keys (for verification) and private keys (for signing) in a standardized format that can be easily exchanged between systems. The JWKS holds multiple JWK's

JWT workflow

1. Construct your header as a %DynamicObject and add custom headers if needed.

2. Construct the body/claims directly as a %DynamicObject

3. Call the Create method from the %Net.JSON.JWT class.

Set sc = ##Class(%Net.JSON.JWT).Create(header, , claims, jwks, , .JWT)

Create JWK

Set sc = ##Class(%Net.JSON.JWK).Create("HS256","1212ASD!@#!#@$@#@$$#SDFDGD#%+_)(*@$SFFS",.privateJWK,.publicJWK)

This will return the private key

{"kty":"oct","k":"MTIxMkFTRCFAIyEjQCRAI0AkJCNTREZER0QjJStfKSgqQCRTRkZT","alg":"HS256"

Some important JWK Properties

"kty": "oct" - represents the symmetric algorithm
"kty": "RSA" / "kty": "EC" - represents the Asymmetric algorithm

Once the JWK is created, it can be added to the JWKS.

Let's create JWKS in IRIS

Set sc = ##class(%Net.JSON.JWKS).PutJWK(jwk,.JWKS)

This method returns the JWKS

Generating the JWT in IRIS

You can create Symmetric or Asymmetric key JWTs in IRIS. The %Net.JSON.JWK class is primarily used to generate the JWT. Before calling the method, ensure that you create and send the JWKS for both Symmetric and Asymmetric Encryption when generating the JWT.

Symmetric Encryption

Symmetric algorithms use a shared secret key, where both the sender and receiver use the same key to sign and verify the JWT. These algorithms, like HMAC (HS256, HS512, HS384), generate a hash (signature) for the JWT payload. This approach is not recommended for high-security systems since both signing and verification are exposed, posing potential security risks.

The Create method from the %Net.JSON.JWK class is used to generate the JWK. It takes two input parameters and returns two output parameters:

1. algorithm - The algorithm for which to create the JWK.
2. secert - The key which is used to sign and verify the JWT
3. privateJWK - The private JSON Web Key that is created.
4. publicJWK - The public JSON Web key that is created.

For symmetric key algorithms - you'll get privateJWK

for Asymmetric key algorithms- You'll get privateJWK and publicJWK
 
SymmetricKeyJWT

Output 

LEARNING>d ##class(Learning.JWT.NetJWT).SymmetricKeyJWT()
privateJWK={"kty":"oct","k":"MTIxMkFTRCFAIyEjQCRAI0AkJCNTREZER0QjJStfKSgqQCRTRkZT","alg":"HS256"}  ; <DYNAMIC OBJECT>
privateJWKS="{""keys"":[{""kty"":""oct"",""k"":""MTIxMkFTRCFAIyEjQCRAI0AkJCNTREZER0QjJStfKSgqQCRTRkZT"",""alg"":""HS256""}]}"
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCIsIngtYyI6InRlIn0.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.PcCs_I8AVy5HsLu-s6kQYWaGvuwqwPAElIad11NpM_E

Asymmetric Encryption

Asymmetric encryption refers to the use of a key pair: one key for signing the token (private key) and another key for verifying the token (public key). This is different from symmetric encryption

Private Key: This key is used for signing the JWT. It is kept secret and should never be exposed.
Public Key: This key is used to verify the authenticity of the JWT. It can be safely shared and distributed because it cannot be used to sign new tokens.

You can generate the JWT Asymmetric encryption with private key/certificate via %SYS.X509Credentials. so, You have to store your certificate in this persistent class.

 
AsymmetricWithx509

 

JWT in Web applications.

Starting from the 2023 version, IRIS includes built-in JWT creation for web applications by default. Ensure that JWT Authentication is enabled when setting up your web application

I've added the brief explanation about the configuration

1. Enable the JWT Authentication in your web application
2. If you haven't already, create a REST class
3. The default endpoint resource "/login" is included. Make a REST API call using basic authentication with the payload like {"user": "_SYSTEM", "password": "SYS"}.
4. The response will be a JSON containing the "access_token," "refresh_token," and other relevant details.
5. Use the "access_token" for authorization.

Discussion (0)1
Log in or sign up to continue