using command line to access web server.
using command line to access web server.
openssl s_client -connect SERVER:443
If the web server is SNI, you can use the command as follows
openssl s_client -connect SERVER:443 -servername SNIName
	
    
    using command line to access web server.
openssl s_client -connect SERVER:443
If the web server is SNI, you can use the command as follows
openssl s_client -connect SERVER:443 -servername SNIName
1.sendmai forward setting.
sendmail.cf (sendmail.mc) , you can change SMART_HOST’s behaviof by using “[“.
[example] If you wanto to make sendmail forward always to mailserver.hoge.com, you should write the setting as follows.
DS[mailserver.hoge.com]
If you don’t use “[“, sendmail will decide the forward destination by searching MX record.
so It is no guarantee to forward mailserver.hoge.com.
2. stop forwarding except for specific domain.
(1)add alias
#echo 'trash: /dev/null' >> /etc/aliases #newaliases
(2)modify mailertable
#vi /etc/mail/mailertable hoge.jp.com smtp:[forwarding mail server] . local:trash (using "[ ]" to avoid searching MX record )
(3)convert mailertable
#makemap hash /etc/mail/mailertable < /etc/mail/mailertable
(4)resart sendmail
#/etc/rc.d/init.d/sendmail restart
3. If you could’t access DNS, and you want to forward another SMTP by sendmail.
make /etc/mail/service.switch. and write down as follows.
hosts files
NTML Authentication sample code for Java
// HttpClient Version is 4.3.3
String userName = "test";
String password = "test";
HttpClientBuilder builder = HttpClientBuilder.create();
CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
credentialsProvider.setCredentials(AuthScope.ANY, new NTCredentials(userName + ":" + password));
builder.setDefaultCredentialsProvider(credentialsProvider);
 
HttpClient httpClient = builder.build();
HttpGet httpGet = new HttpGet("http://hogehoge");
 
try {
    HttpResponse response = httpClient.execute(httpGet);
    response.getEntity().writeTo(System.out);
} catch (ClientProtocolException e) {
    e.printStackTrace();
} catch (IOException e) {
    e.printStackTrace();
}
Using WebAccess activities response body to next WebAccess activities request body(Azure Data Factory)
[Alert] Web Access activity can’t handle more than 4MB. [Microsoft’s web site]

Web2 Settings
Method:POST
Body: @concat(‘{ “records”:’, activity(‘Web1’).output.records, ‘}’)
Thre result of Web1 Activity is not a simple strings. You can get value by using “activity(‘Web1’).output.records”.
But it is an array object and ommited the first
{
     "records" : [
And the last
] }
So. You can build string by using concat function.
convert csv to json with using Copy Activity

1.Source
Set Additional Columns as follows

2.Mapping

■Related article
convert json file without using Copy Activity (Azure Data Factory)
Azure Data Factory.
How to convert json file format without using Copy Activity.
Basically, You shuld use Copy Activity to convert json. But If you want to do something detailed, you can manage it by using Lookup, ForEach, SetVariable Activities.
In this case, You should manage to escape strings such liken “\n”, “\r”, “\”….
1.json file on BLOB storage
{
     "datarecords" : [
          {  "name" : "name01",  "value" : " value01" },
          {  "name" : "name02",  "value" :  "value02" }
    ]
}
2.converted json
{
     "records" : [
          { 
                "attr" : { "rid" : "name01"},
                "id" : "name01", 
                 "info" : "value01"
          },
          { 
                "attr" : { "rid" : "name01"},
               "id" : "name02",
                "info" : "value02"
          }
     ]
}
3. Pipeline
3.1. Pileline variables
BUFFER_V1_1   String
BUFFER_V1_2   String
BUFFER_V1_3   String
3.2. Pipeline structure

3.3. Lookup1
3.4. ForEach1
@activity('Lookup1').output.value[0].datarecords
3.5. Set V1
@concat(variable('BUFFER_V1_2'), '{ "attr":{ "rid": "', ESCAPE(item().name), '"}, "id":"', ESCAPE(item().name), '","info":"', ESCAPE(item().value),'"}')
ESCAPE() is omitted. you shuld write below code.
uriComponentToString(replace(replace(replace(replace(replace(urlComponent(coalesce( *** , ”)),’%5C’,’%5C%5C’), ‘%22′,’%5C%22’), ‘%0D’,’%5Cr’), ‘%0A’, ‘%5Cn’), ‘%09’, ‘%5Ct’))
replace(**, ‘%5C’,’%5C%5C) ….. replace “\” to “\\”
replace(**, ‘%22’,’%5C%22) ….. replace “”” to “\””
replace(‘**’, ‘%0D’,’%5Cr’) …. replace \r to “\r”
replace(‘**’, ‘%0A’,’%5Cn’) …. replace \n to “\n”
replace(‘**’, ‘%09′,’%5Ct’) ….. replace \t to “\t”
3.6. Set V2
@concat(variable('BUFFER_V1_1'), ',')
3.7. Set V3
@concat(variable('BUFFER_V1_3'), '{ "records" [', variable('BUFFER_V1_1'),'}')
。
1.how to create self-signed certificate
!/bin/sh
CN=******.co.jp
PASSWORD=abcdefgxyz
IP=127.0.0.1
echo subjectAltName = DNS:$CN, IP:$IP > subjectname.txt
SJ="/C=JP/ST=Tokyo/L=Minato-ku/O=****/OU=****/CN=$CN"
openssl genrsa -des3 -passout pass:${PASSWORD} -out ${CN}.key 2048
openssl rsa -passin pass:${PASSWORD} -in ${CN}.key -out ${CN}.key
openssl req -new -sha256 -key ${CN}.key -out ${CN}.csr -subj "$SJ"
#openssl req -noout -text -in ${CN}.csr
#openssl req -x509 -in ${CN}.csr -key ${CN}.key -out ${CN}.crt -days 3650
openssl x509 -days 3650 -req -extfile subjectname.txt -signkey  ${CN}.key < $CN.csr > $CN.crt
#CHANGE CSR to PFX
openssl pkcs12 -export -in ${CN}.crt -inkey ${CN}.key -out ${CN}.pfx -passout pass:${PASSWORD}
convert csv file to json file.
How to convert json file format without using Copy Activity.
Basically, You shuld use Copy Activity to convert json. But If you want to do something detailed, you can manage it by using Lookup, ForEach, SetVariable Activities.
In this case, You should manage to escape strings such liken “\n”, “\r”, “\”….
1.csv file on blob storage
"name01","value01"
"name02","value02"
 
2.json file after converted
{
     "records" : [
          { "id" : "name01", "info" : "value01"},
          { "id" : "name02", "info" : "value02"}
     ]
}
3. pileline
3.1. pileline variables
BUFFER_V1_1   String
BUFFER_V1_2   String
BUFFER_V1_3   String
3.2. pileline structure

3.3. Lookup1 (Lookup)
3.4. ForEach1 (ForEach)
@activity('Lookup1').output.value
3.5. Set V1 (Set variable)
@concat(variable('BUFFER_V1_2'), '{"id":"', ESCAPE(item().Prop_0), '","info":"', ESCAPE(item().Prop_1),'"}')
ESCAPE() is omitted. you shuld write below code.
uriComponentToString(replace(replace(replace(replace(replace(urlComponent(coalesce( *** , ”)),’%5C’,’%5C%5C’), ‘%22′,’%5C%22’), ‘%0D’,’%5Cr’), ‘%0A’, ‘%5Cn’), ‘%09’, ‘%5Ct’))
replace(**, ‘%5C’,’%5C%5C) ….. replace “\” to “\\”
replace(**, ‘%22’,’%5C%22) ….. replace “”” to “\””
replace(‘**’, ‘%0D’,’%5Cr’) …. replace \r to “\r”
replace(‘**’, ‘%0A’,’%5Cn’) …. replace \n to “\n”
replace(‘**’, ‘%09′,’%5Ct’) ….. replace \t to “\t”
3.6. Set V2 (Set variable)
@concat(variable('BUFFER_V1_1'), ',')
3.7. Set V3 (Set variable)
@concat(variable(‘BUFFER_V1_3’), ‘{ “records” [‘, variable(‘BUFFER_V1_1′),’}’)
■Related article
convert csv to json with using Copy Activity(Azure Data Factory)