Find

Digest
· Sep 23, 2024

InterSystems 开发者出版物,九月 16 - 22, 2024,摘要

Article
· Sep 22, 2024 3m read

第三十章 使用派生密钥令牌进行加密和签名

第三十章 使用派生密钥令牌进行加密和签名

IRIS 支持 WS-SecureConversation 1.4 定义的 <DerivedKeyToken> 元素。可以创建并使用<DerivedKeyToken> 元素进行加密和签名,作为前三个主题中描述的方法的替代。

通常,会同时执行加密和签名。为简单起见,本主题分别介绍这些任务。有关结合加密和签名的信息,请参阅结合加密和签名。

概述

<DerivedKeyToken> 元素旨在携带发送者和接收者可以独立使用的信息来生成相同的对称密钥。这些方可以使用该对称密钥对 SOAP 消息的指定部分进行加密、签名或同时执行这两种操作。

要生成和使用 <DerivedKeyToken>,请执行以下操作:

1 Comment
Discussion (1)1
Log in or sign up to continue
Article
· Sep 22, 2024 2m read

Deploying InterSystems WSGI Apps on AWS with Pulumi and Docker Compose

In this post, we'll discuss our project that leverages Pulumi and Docker Compose to automate the deployment of InterSystems WSGI applications on AWS. The focus is on simplicity and efficiency, using pre-built infrastructure templates for provisioning and scaling AWS resources.

Overview

This repository automates the deployment of a WSGI-based application using AWS infrastructure templates and Pulumi’s Python SDK. The infrastructure is provisioned with Pulumi's declarative approach, while Docker Compose handles application orchestration. The project is structured to minimize the manual effort of setting up complex AWS resources, offering a Python-first way to manage the entire process.


Infrastructure Components

The deployment pipeline focuses on a few key AWS services:

  1. EC2 Instances: The core of the deployment. EC2 instances are provisioned to host the WSGI application using Pulumi. These instances are created with Docker pre-installed, which will later handle the application container.
  2. VPC: A dedicated VPC is created to encapsulate all networking aspects of the deployment. Subnets, route tables, and an internet gateway are configured to ensure proper traffic routing.
  3. Security Groups: Security groups are configured to allow HTTP (port 80) and SSH (port 22) traffic, alongside custom ports for the InterSystems WSGI application.
  4. IAM Roles: Pulumi provisions an IAM role for EC2, granting the necessary permissions for accessing resources like S3 buckets or ECR (if needed).

Pulumi + Python

Pulumi's declarative style makes infrastructure management highly manageable in Python. Here’s how it works:

  1. Define AWS Resources: In __main__.py, Pulumi is used to define the core AWS resources such as EC2 instances, VPCs, and security groups. This is done by interacting with the pulumi_aws module to specify the configuration.
  2. Parameter Injection: The project accepts a repository URL (where the application’s Docker Compose file is hosted) as a configuration parameter. Pulumi’s config module pulls this value and integrates it into the deployment.
  3. Docker Compose for Application Management: Once the EC2 instance is created, Docker Compose is used to pull the application from the given repository, build it, and bring it up in a containerized environment. This isolates the application runtime and ensures consistency across environments.

Test for yourself

Our application can be found here: https://openexchange.intersystems.com/package/Irisheimer

You can use the InterSystems WSGI project: https://github.com/grongierisc/iris-flask-template

Discussion (0)1
Log in or sign up to continue
Article
· Sep 22, 2024 1m read

Lidando com NULL em SQL

Rubrica InterSystems FAQ

No SQL, dados NULL e a string vazia ('') são dados diferentes. O método para definir e checar cada uma é como se segue

(1) dado NULL

[SQL] 

insert into test(a) values(NULL)
select * from test where a IS NULL

[InterSystems ObjectScript]

set x=##class(User.test).%New()
set x.a=""

(2) String Vazia ('')

[SQL]

insert into test(a) values('')
select * from test where a = ''

[InterSystems ObjectScript]

set x=##class(User.test).%New()
set x.a=$C(0)

Para mais informações, por favor veja os seguintes documentos:

NULL e strings vazias [IRIS]
NULL e strings vazias

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