Skip to content

Commit

Permalink
Merge pull request #1886 from ldclakmal/fix-security-bbes
Browse files Browse the repository at this point in the history
Update instructions of security BBEs
  • Loading branch information
ldclakmal authored Jun 2, 2021
2 parents eab4ad0 + 7355b26 commit 85b09a9
Show file tree
Hide file tree
Showing 23 changed files with 45 additions and 99 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# To run this sample, navigate to the directory that contains the `.bal` file,
# and execute the `bal run` command below.
# Ensure that the `Config.toml` file is populated correctly with the user
# information.
# As a prerequisite, ensure that the `Config.toml` file is populated correctly
# with the user information.
echo '[["ballerina.auth.users"]]
username="alice"
password="password1"
Expand All @@ -10,6 +8,7 @@ scopes=["scope1"]
username="bob"
password="password2"
scopes=["scope2", "scope3"]' > Config.toml
# (You may need to change the certificate file path and private key file path.)

# You may need to change the certificate file path and private key file path.
bal run graphql_service_basic_auth_file_user_store.bal
[ballerina/http] started HTTPS/WSS listener 0.0.0.0:9090
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# To run this sample, navigate to the directory that contains the `.bal` file,
# and execute the `bal run` command below.
# (You may need to change the certificate file path and private key file path.)
# You may need to change the certificate file path and private key file path.
bal run graphql_service_basic_auth_ldap_user_store.bal
[ballerina/http] started HTTPS/WSS listener 0.0.0.0:9090
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# To run this sample, navigate to the directory that contains the `.bal` file,
# and execute the `bal run` command below.
# (You may need to change the certificate file path, private key file path and
# trusted certificate file path.)
# You may need to change the certificate file path, private key file path, and
# trusted certificate file path.
bal run graphql_service_jwt_auth.bal
[ballerina/http] started HTTPS/WSS listener 0.0.0.0:9090
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# To run this sample, navigate to the directory that contains the `.bal` file,
# and execute the `bal run` command below.
# (You may need to change the certificate file path, private key file path, and
# trusted certificate file path.)
# You may need to change the certificate file path, private key file path, and
# trusted certificate file path.
bal run graphql_service_mutual_ssl.bal
[ballerina/http] started HTTPS/WSS listener 0.0.0.0:9090
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# To run this sample, navigate to the directory that contains the `.bal` file,
# and execute the `bal run` command below.
# (You may need to change the certificate file path, private key file path and
# trusted certificate file path.)
# You may need to change the certificate file path, private key file path, and
# trusted certificate file path.
bal run graphql_service_oauth2.bal
[ballerina/http] started HTTPS/WSS listener 0.0.0.0:9090
4 changes: 1 addition & 3 deletions examples/graphql-service-ssl-tls/graphql_service_ssl_tls.out
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# To run this sample, navigate to the directory that contains the `.bal` file,
# and execute the `bal run` command below.
# (You may need to change the certificate file path and private key file path.)
# You may need to change the certificate file path and private key file path.
bal run graphql_service_ssl_tls.bal
[ballerina/http] started HTTPS/WSS listener 0.0.0.0:9090
6 changes: 2 additions & 4 deletions examples/http-client-basic-auth/http_client_basic_auth.out
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Before testing this sample, first start a sample service secured with Basic Auth.
# To run this sample, navigate to the directory that contains the `.bal` file,
# and execute the `bal run` command below.
# (You may need to change the trusted certificate file path.)
# As a prerequisite, start a sample service secured with Basic Auth.
# You may need to change the trusted certificate file path.
bal run http_client_basic_auth.bal
Hello, World!
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Before testing this sample, first start a secured sample service.
# To run this sample, navigate to the directory that contains the `.bal` file,
# and execute the `bal run` command below.
# (You may need to change the trusted certificate file path.)
# As a prerequisite, start a secured sample service.
# You may need to change the trusted certificate file path.
bal run http_client_bearer_token_auth.bal
Hello, World!
13 changes: 3 additions & 10 deletions examples/http-client-mutual-ssl/http_client_mutual_ssl.out
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
# As a prerequisite, navigate to the directory that contains the
# `http_service_mutual_ssl.bal` file and execute the `bal run` command below.
# (You may need to change the certificate file path and private key file path.)
bal run http_service_mutual_ssl.bal
[ballerina/http] started HTTPS/WSS listener 0.0.0.0:9090

# To run this sample, navigate to the directory that contains the `.bal` file,
# and execute the `bal run` command below.
# (You may need to change the certificate file path, private key file path and
# trusted certificate file path.)
# As a prerequisite, start a sample service secured with mutual SSL.
# You may need to change the certificate file path, private key file path, and
# trusted certificate file path.
bal run http_client_mutual_ssl.bal
Hello, World!
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Before testing this sample, first start a sample service secured with OAuth2.
# To run this sample, navigate to the directory that contains the `.bal` file,
# and execute the `bal run` command below.
# (You may need to change the trusted certificate file path.)
# As a prerequisite, start a sample service secured with OAuth2.
# You may need to change the trusted certificate file path.
bal run http_client_oauth2_client_credentials_grant_type.bal
Hello, World!
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Before testing this sample, first start a sample service secured with OAuth2.
# To run this sample, navigate to the directory that contains the `.bal` file,
# and execute the `bal run` command below.
# (You may need to change the trusted certificate file path.)
# As a prerequisite, start a sample service secured with OAuth2.
# You may need to change the trusted certificate file path.
bal run http_client_oauth2_password_grant_type.bal
Hello, World!
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Before test this sample, first start a sample service secured with OAuth2.
# To run this sample, navigate to the directory that contains the `.bal` file,
# and execute the `bal run` command below.
# (You may need to change the trusted certificate file path.)
# As a prerequisite, start a sample service secured with OAuth2.
# You may need to change the trusted certificate file path.
bal run http_client_oauth2_refresh_token_grant_type.bal
Hello, World!
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Before testing this sample, first start a sample service secured with JWT Auth.
# To run this sample, navigate to the directory that contains the `.bal` file,
# and execute the `bal run` command below.
# (You may need to change the trusted certificate file path and private key file path.)
# As a prerequisite, start a sample service secured with OAuth2.
# You may need to change the trusted certificate file path and private key file path.
bal run http_client_self_signed_jwt_auth.bal
Hello, World!
11 changes: 2 additions & 9 deletions examples/http-client-ssl-tls/http_client_ssl_tls.out
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
# As a prerequisite, navigate to the directory that contains the
# `http_service_ssl_tls.bal` file and execute the `bal run` command below.
# (You may need to change the certificate file path and private key file path.)
bal run http_service_ssl_tls.bal
[ballerina/http] started HTTPS/WSS listener 0.0.0.0:9090

# To run this sample, navigate to the directory that contains the `.bal` file,
# and execute the `bal run` command below.
# (You may need to change the trusted certificate file path.)
# As a prerequisite, start a sample service secured with SSL.
# You may need to change the trusted certificate file path.
bal run http_client_ssl_tls.bal
Hello, World!
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# To run this sample, navigate to the directory that contains the `.bal` file,
# and execute the `bal run` command below.
# Ensure that the `Config.toml` file is populated correctly with the user
# information.
# As a prerequisite, ensure that the `Config.toml` file is populated correctly
# with the user information.
echo '[["ballerina.auth.users"]]
username="alice"
password="password1"
Expand All @@ -10,6 +8,7 @@ scopes=["scope1"]
username="bob"
password="password2"
scopes=["scope2", "scope3"]' > Config.toml
# (You may need to change the certificate file path and private key file path.)

# You may need to change the certificate file path and private key file path.
bal run http_service_basic_auth_file_user_store.bal
[ballerina/http] started HTTPS/WSS listener 0.0.0.0:9090
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# To run this sample, navigate to the directory that contains the `.bal` file,
# and execute the `bal run` command below.
# (You may need to change the certificate file path and private key file path.)
# You may need to change the certificate file path and private key file path.
bal run http_service_basic_auth_ldap_user_store.bal
[ballerina/http] started HTTPS/WSS listener 0.0.0.0:9090
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# To run this sample, navigate to the directory that contains the `.bal` file,
# and execute the `bal run` command below.
# (You may need to change the certificate file path, private key file path and
# trusted certificate file path.)
# You may need to change the certificate file path, private key file path, and
# trusted certificate file path.
bal run http_service_jwt_auth.bal
[ballerina/http] started HTTPS/WSS listener 0.0.0.0:9090
6 changes: 2 additions & 4 deletions examples/http-service-mutual-ssl/http_service_mutual_ssl.out
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# To run this sample, navigate to the directory that contains the `.bal` file,
# and execute the `bal run` command below.
# (You may need to change the certificate file path, private key file path, and
# trusted certificate file path.)
# You may need to change the certificate file path, private key file path, and
# trusted certificate file path.
bal run http_service_mutual_ssl.bal
[ballerina/http] started HTTPS/WSS listener 0.0.0.0:9090
6 changes: 2 additions & 4 deletions examples/http-service-oauth2/http_service_oauth2.server.out
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# To run this sample, navigate to the directory that contains the `.bal` file,
# and execute the `bal run` command below.
# (You may need to change the certificate file path, private key file path and
# trusted certificate file path.)
# You may need to change the certificate file path, private key file path, and
# trusted certificate file path.
bal run http_service_oauth2.bal
[ballerina/http] started HTTPS/WSS listener 0.0.0.0:9090
4 changes: 1 addition & 3 deletions examples/http-service-ssl-tls/http_service_ssl_tls.out
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# To run this sample, navigate to the directory that contains the `.bal` file,
# and execute the `bal run` command below.
# (You may need to change the certificate file path and private key file path.)
# You may need to change the certificate file path and private key file path.
bal run http_service_ssl_tls.bal
[ballerina/http] started HTTPS/WSS listener 0.0.0.0:9090
6 changes: 2 additions & 4 deletions examples/security-crypto/security_crypto.out
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# To run this sample, navigate to the directory that contains the `.bal` file,
# and execute the `bal run` command below.
# (You may need to change the certificate file path, private key file path and
keystore/truststore file path.)
# You may need to change the certificate file path, private key file path, and
# trusted certificate file path.
bal run security_crypto.bal
Hex encoded hash with MD5: 0605402ee16d8e96511a58ff105bc24a
Base64 encoded hash with SHA1: /8fwbGIevBvv2Nl3gEL9DtWas+Q=
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# To run this sample, navigate to the directory that contains the `.bal` file,
# and execute the `bal run` command below.
# (You may need to change the certificate file path, trusted certificate file
# path and private key file path.)
# You may need to change the certificate file path, private key file path, and
# trusted certificate file path.
bal run security_jwt_issue_validate.bal
Issued JWT: eyJhbGciOiJSUzI1NiIsICJ0eXAiOiJKV1QiLCAia2lkIjoiTlRBeFptTXhORE15WkR
nM01UVTFaR00wTXpFek9ESmhaV0k0TkRObFpEVTFPR0ZrTmpGaU1RIn0.eyJpc3MiOi
Expand Down
2 changes: 0 additions & 2 deletions examples/url-encode-decode/url_encode_decode.out
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# To run this sample, navigate to the directory that contains the `.bal` file,
# and execute the `bal run` command below.
bal run url_encode_decode.bal
URL encoded value: data%3Dvalue
URL decoded value: data=value

0 comments on commit 85b09a9

Please sign in to comment.