Transit service configuration
1. Transfer service deployment*
Transit service release package and detailed deployment documentation: enterPriseWeChatToolKits.rar。In the web server (Tomcat) released under transfer service (enterPriseWeChatToolKits.war)
The deployed server should be a server that has access to both the Jira system and the public network. It is important to note that if you deploy to a server on which your Jira system resides, you should take care to prevent port conflicts (Jira uses ports 8080 and 8005 by default).
Once the deployment is complete, modify the file upload post restrictions. Take Tomcat as an example: add maxPostSize="-1" to the connector tag of the Tomcat root path /conf/server.xml.
2. Configure the forwarding service address*
Forwarding service publication address) such as:http://127.0.0.1:8080/enterPriseWeChatToolKits
3. Configure application links*
3.1 Generate RSA public/private key pairs
On your PC, install openssl environment. Run the following openssl command:
openssl genrsa -out jira_privatekey.pem 1024
openssl req -newkey rsa:1024 -x509 -key jira_privatekey.pem -out jira_publickey.cer -days 365
openssl pkcs8 -topk8 -nocrypt -in jira_privatekey.pem -out jira_privatekey.pcks8
openssl x509 -pubkey -noout -in jira_publickey.cer> jira_publickey.pem
After running the above command, several files are generated. Where, the file jira_privatekey.pcks8 contains the privatekey; The publickey is stored in the jira_publickey.pem file.
3.2 Create application links
In Jira, navigate to the gear icon > application > application link.
In the field, enter the url of the application you want to link to, and enter the url you want to link to (relay service address, such as:http://127.0.0.1:8080/enterPriseWeChatToolKits, then click create new link.
You receive a warning message saying, "No response to the url you entered." Ignore it and click Continue. The pop-up dialog box is as follows:
Among them, such as name of transit address for http://127.0.0.1:8080/enterPriseWeChatToolKits application recommended project name namely (enterPriseWeChatToolKits);
Application type selection general application;
shdsd is recommended by the service provider;
consumer Key and Shared Secret are optional(English characters only The consumer Key and secret must remain with the contents in the config.Properties configuration under webapp as shown in the figure below:);
View the transit service configuration
Request token URL fill in: Jira system baseUrl + / plugins/servlet/request/request - token;
Access token URL fill in: Jira system baseUrl + / plugins/servlet/request/access token;
Fill in the authentication URL: Jira system baseUrl + / plugins/servlet/request/request/the authorize.
When you are done,Do not check to create incoming links, click continue. Get an application link that looks like this:
Click the little pencil icon on the application link to edit the application link. Click "incoming validation" :
Where, the consumer key and the consumer name should be set to the same as the consumer Key in a window.
The publickey (publickey) should be copied from the jira_publickey.pem file (You need to get rid of the newline in jira_publickey.pem first. The public key should be a continuous, newline-free string);
Customer callback URL filling Forwarding service address + /page/getAccessToken.
When you have finished typing, click Continue. The application link is created.
4. Modify the configuration file of the transit service*
Modify the transit service configuration
5. Jira token application for transit service*
Request a Jira token for a transit service
After updating token, restart the relay service (Tomcat (the Web server where the relay service is published).
Create the jiraWebHook message push address corresponding to the forwarding service address;
6. Configure jiraWebHook message push address*
After the Jira token configuration of the forwarding service succeeds, please configure the jiraWebHook message push address:
Otherwise, it may affect the message push; Check the jiraWebHook
(After configuring Jira token, click the button below to create the corresponding jiraWebHook message push address)
Create the jiraWebHook message push address corresponding to the forwarding service address; Create jiraWebHook
7. WeChat Work self-built application configuration*
https://work.weixin.qq.com/ in the browser input path, use the administrator login WeChat backstage management interface.
Click Application Management, scroll down to the bottom, in your own app, click Create App.
The following interface appears:
Enter application information and click create application.
And then I will go back to the application management screen and click on the application that I just created,
Display the following page:
Click on the set up trusted domain names, the following pop-up box appears:
8. WeChat Work self-built application configuration workbench application home page*
Click On Application Management to find the functions and find the workbench Application home page.
The following interface appears:
Set the corresponding application home page address (for example, the domain name http://port/enterPriseWeChatToolKits/wechat/index)
The result is displayed when the setup is complete