Part 2 Using the SmartHR library kiji to run e-Gov (e-Gov public materials)

Introducing the flow and public materials for general software developers to develop software services using the e-Gov external linkage API.

1. 1. Development flow

General software developers, etc. (hereinafter referred to as "developer companies") need to apply for software development to e-Gov (Ministry of Internal Affairs and Communications).

① Apply for software development ② Documents related to application for verification environment use will be sent from e-Gov ③ The developer fills in the necessary items (user ID, etc.) and sends the verification environment use application to e-Gov. ④ e-Gov sends materials related to the verification environment ⑤ The developer develops software services ⑥ The developer applies for the final confirmation test ⑦ The developer submits the final confirmation test result ⑧ Software service becomes available by pass judgment from e-Gov

In ③, the developer describes the following contents in the verification environment use application form.

No Contents to be filled in the verification environment use application form
1 Corporate organization name
2 Software name
3 User ID (up to 3 people can apply)
4 Specify the external linkage API used in the verification environment with 〇. User ID registration, user authentication, and batch application are required.

At ④, e-Gov will send you materials related to the verification environment. Developers need to tightly control this information.

No Documents about the verification environment
1 Verification environment usage notice (verification environment URL, software ID, user ID, basic authentication ID and password)
2 API test data information (test data for correction notification list acquisition API, partial correction API, correction resubmission API that can be used only by software ID)
3 Final confirmation test Test specifications and report

Regarding the verification environment URL, the request URL will be different from the production environment. At this timing, the user ID described in the verification environment usage application form is registered in e-Gov, and the following certificates are managed in association with this user ID.

Certificate status Certificate file name
Effectiveness e-GovEE01_sha2.pfx
Expired e-GovEE04_sha2.pfx
Expired e-GovEE05_sha2.pfx

2. About public materials

You can Download the materials prepared for developers from e-Gov. Here you will find usage guides, terms, application forms, specifications, digital certificates for verification environment testing, etc.

No Usage guide, application form, etc.
1 External linkage API API overview
2 External linkage API usage guide
3 External linkage API Various application forms (set)
4 External linkage API Terms of use
5 External linkage API Handling of personal information
No Specifications, application form XML structure definition
1 External linkage API API (Version 1) specifications
2 External linkage API Information security requirement specifications
3 External linkage API Application data specifications Common data specifications
4 List of applicable procedures
5 List of procedure information / list of submission destinations (set)
6 Application form XML structure definition Social insurance-related procedures
7 Application form XML structure definition Employment insurance related procedures
8 Application form XML structure definition Labor insurance application collection related procedures
No Verification environment test procedure
1 API test procedure list
2 API test procedure list (Attachment API test procedure status transition list)
3 Application form XML structure definition [API test procedure]
No Digital certificate for verification environment test
1 Digital certificate

Here, we will introduce the specifications, verification environment test procedures, and digital certificates.

2.1 Specifications

(1) API (Version 1) specifications

It describes the specifications related to the request URI and its parameters for electronic application using API, the send XML specified in the http request body, and the response body (response XML) returned by e-Gov.

(2) Information security requirement specifications

It describes the security requirements that developers must comply with when developing software.

(3) Application data specifications Common data specifications

The data specifications common to all procedures and the individual specifications for each procedure are described. The XML tag structure is defined for configuration management XML, configuration information XML, and application form XML.

(4) Application data specifications and application XML structure definition

The individual specifications for the application data for each procedure are described.

2.2 Verification environment test procedure

It is a public specification about the test procedure that can be used when testing related to the external linkage API in the verification environment.

No Application form XML structure definition [API test procedure]
1 API test procedure list
2 API test procedure list (Attachment API test procedure status transition list)
3 Application form XML structure definition [API test procedure]

--In the verification environment, 38 types of standard format and 45 types of individual signature format are prepared for labor and social insurance related procedures for both normal and error systems. --Each procedure defines conditions related to the procedure (signature / non-signature, attached documents, submission destination, withdrawal, etc.), possible processing after arrival, etc. --Each procedure belongs to one of 32 form patterns, and it is necessary to set data items according to the contents of the form pattern.

In the "API test procedure list", you can check the following contents for the test procedure.

――The application form for each procedure is patterned so that it covers the test cases required for testing the API, and appropriate procedure information is set and maintained. --For the procedures for issuing official documents and the procedures for notifying comments, sample official documents and comment contents will be notified respectively. --The file format extensions allowed for attachments are "doc", "xls", "pdf", "docx", "xlsx", and "txt". --For procedures whose first three digits of the procedure identifier are "950", the status after application will be automatically changed.

In "API test procedure list (attached API test procedure status transition list)", you can check the automatic status transition. The following two examples are introduced.

--Of the standard format, the procedure identifier = 950A010002010000 has the procedure name "Notification of change (correction) related to health insurance / welfare annuity insurance business establishment / electronic application", and an official document will be issued. When the software service makes a batch application, it automatically transitions from (reached) → (under review) → (finished review), and when (finished review) is reached, the official document can be obtained. --Of the standard format, the procedure identifier = 950A010700007000 is the procedure name "Health insurance / welfare annuity insurance insured qualification acquisition notification, Seafarer insurance / welfare annuity insurance insured qualification acquisition notification / electronic application" and is an official document. Will not be issued. When the software service makes a batch application, it automatically transitions from (reached) to (under review). Furthermore, when the software service makes a withdrawal request by specifying the arrival number, it automatically transitions from (under review-during withdrawal processing) → (procedure completed-withdrawn).

2.3 Digital certificate

This section describes the SHA-256 version of the digital certificate used in the verification environment.

No file name Description
1 e-GovEE01_sha2.pfx A valid certificate preset for the user ID
2 e-GovEE02_sha2.pfx Valid certificate
3 e-GovEE03_sha2.pfx Valid certificate
4 e-GovEE04-1_sha2.pfx Expired certificate preset for user ID
5 e-GovEE04-2_sha2.pfx Valid certificate
6 e-GovEE05_sha2.pfx An expired certificate preset for the user ID

The digital certificate suffix represents the format of the certificate. ".Pfx" is a PKCS # 12 (PFX) format key and certificate format that allows you to store and protect your server key along with the entire certificate chain. This format is often used in Microsoft products.

Use the openssl command to check the contents of the certificate. If you are prompted for a password along the way, enter "gpkitest".

Openssl execution result


>openssl pkcs12 -info -in e-GovEE01_sha2.pfx
Enter Import Password:(Enter "gpkitest")
MAC Iteration 2000
MAC verified OK
PKCS7 Data
Shrouded Keybag: pbeWithSHA1And3-KeyTripleDES-CBC, Iteration 2000
Bag Attributes
    localKeyID: 01 00 00 00
    friendlyName: le-d39d0281-d8cb-4396-b002-b4366119c8e4
    Microsoft CSP Name: Microsoft Enhanced Cryptographic Provider v1.0
Key Attributes
    X509v3 Key Usage: 10
Enter PEM pass phrase:
Verifying - Enter PEM pass phrase:
-----BEGIN ENCRYPTED PRIVATE KEY-----
MIIFDjBABgkqhkiG9w0BBQ0wMzAbBgkqhkiG9w0BBQwwDgQITLitdILmV8cCAggA
MBQGCCqGSIb3DQMHBAiXSoB8We54iwSCBMiWf80URxShHlnQltb0fsWst7cAZF2D
/FnXM/8RRrMuK561dB5f+7ImMTtJobdOYOEpeO8sqxhGGeEnivFPMhvrsdGKMZul
nCoQBk0ug0iG2vnlQZAP6RPhbo9u4H3ZtTxJeO4DnYdJJj681vx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qte0IRAZ3jzBV46wN2Y0fqKVQNFchIIJleSebd/ka317ICI8gphf+Js
7Y//jUfl03X7oB2GviVHNzvtjJy0AgAlHkltEgswSbWmd3e+lsCtRpnpe4f1qj76
nYTy0AYtvcZwsE7EaCDYGz/KGQVJjorKVgK12N27catPUcDX3NPMhv9YVe1rcVhT
Iku2X6b0c+YmDSGs05m0LUp8HMN/RUAVg+77atjBT72yqABzV2OcZDc9vHCZfYg2
hO/NSfITPB/Jun/gd4VgjH8sO9Eupa/DgZKQ7b858Md6kjK37iKu8cxvG9VfizFj
/msgnKpZmB0lXnvb7hQUgbeOXC0HP1VswZqq1JBzvFICcFo+4KZQquig2SJytR5o
bFxOWp1zXMllQWSunt1aMnmun/B68BU6SiNXNjnTn+gAd+i3avys8X1VLZBFAwKF
6wY=
-----END ENCRYPTED PRIVATE KEY-----
PKCS7 Encrypted data: pbeWithSHA1And40BitRC2-CBC, Iteration 2000
Certificate bag
Bag Attributes
    localKeyID: 01 00 00 00
subject=/C=JP/O=DemoMin1/OU=CA1/CN=Ichiro Madoguchi
issuer=/C=JP/O=DemoMin1/OU=CA1
-----BEGIN CERTIFICATE-----
MIIEizCCA3OgAwIBAgIEWCsMRzANBgkqhkiG9w0BAQsFADAuMQswCQYDVQQGEwJK
UDERMA8GA1UECgwIRGVtb01pbjExDDAKBgNVBAsMA0NBMTAeFw0xOTEwMjUwMTE2
NTZaFw0yNDEwMjQxNDU5NTlaMEkxCzAJBgNVBAYTAkpQMREwDwYDVQQKDAhEZW1v
TWluMTEMMAoGA1UECwwDQ0ExMRkwFwYDVQQDDBBJY2hpcm8gTWFkb2d1Y2hpMIIB
IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsD81VFFmGM26HYdeGrGzbPba
deBzU4WxIE1r6qeZLxjz7DiV42tjo8QFulWZk6hmCeb5j9ChKp+BA/9Yj6usccKH
ZrPQmbcXUZkXRXz9z/7CLxp8b1zAzJakZ0g7o9iU3a3TpyeP6V+GFtk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9SAFk9syL5xKXRyMUGDOheypiJrW/QyOjrxs6cFa5VqaZ
WcRIq8yVPwABCpGG/hjU
-----END CERTIFICATE-----

――The part enclosed by "----- BEGIN ENCRYPTED PRIVATE KEY -----" to "----- END ENCRYPTED PRIVATE KEY -----" is the private key. --The part surrounded by "----- BEGIN CERTIFICATE -----" to "----- END CERTIFICATE -----" is the certificate (public key). --subject means the person to be proved, issuer means the person to prove. --subject = / C = JP / O = DemoMin1 / OU = CA1 / CN = Ichiro Madoguchi, issuer = / C = JP / O = DemoMin1 / OU = CA1, which is a self-signed certificate for testing, so the issuer ( The issuer) and the subject are the same organization.

In e-Gov, the software developer manages three certificates by associating them with the user ID desired when applying for the verification environment. A valid certificate is usually used for testing. In addition, the expired certificate and the revoked certificate will be used in the test to renew the certificate managed by e-Gov.

Certificate status Certificate file name
Effectiveness e-GovEE01_sha2.pfx
Expired e-GovEE04_sha2.pfx
Expired e-GovEE05_sha2.pfx

3. 3. About the final confirmation test

For the final confirmation test, confirm that data transmission / reception between the software service and e-Gov is successful according to the e-Gov specifications. It does not confirm the function of the software service as an application.

The SmartHR library kiji uses RSpec to automate the final confirmation test.

No API name Conditions to confirm HTTP response code
1 User ID registration Specify the user ID to add "201"To be
2 User authentication e-Specify the user ID registered in Gov "200"To be
3 Bulk application Specify batch application file "202"To be
4 Get list information(ID specification) Specify the transmission number at the time of batch application "200"To be
5 Get list information(Date designation) Specify the acquisition target period "200"To be
6 Acquisition of application list information Specify the transmission number at the time of batch application "200"To be
7 Status inquiry Specify the arrival number obtained by acquiring the application list information "200"To be
8 Withdrawal Specify withdrawal data of arrival number that can be withdrawn "200"To be
9 Get list of correction notifications Specify a correctable arrival number for status inquiries "200"To be
10 correction(resubmit) correction(resubmit)Specify a possible arrival number "202"To be
11 correction(Partial correction) correction(Partial correction)Specify a possible arrival number "202"To be
12 correction(Amendment application) correction(Amendment application)Specify a possible arrival number "202"To be
13 Get a list of official documents and comments Specify the arrival number where the official document message of the status inquiry is set "200"To be
14 Obtaining official documents Specify the official document of the notification number within the acquisition deadline "200"To be
15 Official document acquisition completed Specify the official document acquired by acquiring the official document "200"To be
16 Official document signature verification Specify the official document acquired by acquiring the official document "200"To be
17 Get comment notification Specify comment notification of notification number within the acquisition deadline "200"To be
18 Comment notification acquisition completed Specify the comment notification acquired by acquiring the comment notification "200"To be
19 Obtained a list of financial institutions that support electronic payment "200"To be
20 Get electronic payment information list Specify the payable arrival number "200"To be
21 Add certificate identification information Specify the certificate to be newly registered "200"To be
22 Certificate identification information update Specify the certificate to be renewed "200"To be
23 Certificate identification information deletion Specify the certificate to delete "200"To be

Recommended Posts

Part 2 Using the SmartHR library kiji to run e-Gov (e-Gov public materials)
Part 1 Running e-Gov using the SmartHR library kiji (e-Gov specifications)
Part 3 Running e-Gov using the SmartHR library kiji (execution environment construction)
4th SmartHR library kiji is used to run e-Gov (operation check)
I want to automate ssh using the expect command! part2
Tokenize using the Hugging Face library
[Python] How to import the library
What is a C language library? What is the information that is open to the public?
Using COTOHA, I tried to follow the emotional course of Run, Melos!