Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync master branch with 2201.10.0-stage #5600

Merged
merged 72 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
f2def88
Add data.yaml module to the distribution
LakshanWeerasinghe Aug 5, 2024
e36c46f
Merge pull request #5539 from LakshanWeerasinghe/data.yaml-10.x
LakshanWeerasinghe Aug 5, 2024
e968cdd
Update xmldata and jsondata version
prakanth97 Aug 5, 2024
f1c6342
Merge pull request #5540 from prakanth97/2201.10.x
prakanth97 Aug 5, 2024
9f879e2
Update data.yaml timestamp version
LakshanWeerasinghe Aug 7, 2024
2fa075d
Merge pull request #5542 from LakshanWeerasinghe/data.yaml-10.x
LakshanWeerasinghe Aug 7, 2024
ce49e28
Add LDAP module into the Ballerina distribution
ayeshLK Aug 8, 2024
ef3168c
Fix LDAP package org
ayeshLK Aug 8, 2024
e0ef86c
Merge pull request #5553 from ayeshLK/2201.10.x-dev
ayeshLK Aug 8, 2024
e7f5ff3
Update dependency versions
lnash94 Aug 9, 2024
4a0239e
Update lang version
lnash94 Aug 9, 2024
8cc915b
Update persist tool, crypto version
lnash94 Aug 10, 2024
251713c
Merge pull request #5559 from lnash94/u10-libs-version
gabilang Aug 10, 2024
c52f4d1
Update c2c and dev-tools timestamp versions
gabilang Aug 11, 2024
bb738b0
Merge pull request #5562 from gabilang/update-c2c-devtools
gabilang Aug 11, 2024
c33059e
Bump ldap module to 1.0.1
Nuvindu Aug 12, 2024
4f1f0b2
Merge pull request #5564 from ballerina-platform/Nuvindu-patch-1
Nuvindu Aug 12, 2024
4767929
Fix incorrect file path in GraphQL JWT BBE
ThisaruGuruge Aug 12, 2024
5059e2b
Fix incorrect file path in GraphQL JWT BBE
ThisaruGuruge Aug 12, 2024
3d044bc
Merge pull request #5572 from ThisaruGuruge/2201.10.0-stage
ThisaruGuruge Aug 12, 2024
1a6d6a6
Merge pull request #5571 from ThisaruGuruge/2201.10.x
ThisaruGuruge Aug 12, 2024
e832f4c
Add BBE for add/remove entries using LDAP
Nuvindu Aug 13, 2024
5ae9ffe
Add BBE for searching entries using LDAP
Nuvindu Aug 13, 2024
180f1e9
Index new BBEs for LDAP client
Nuvindu Aug 13, 2024
bbfc500
Apply suggestions from the review
Nuvindu Aug 13, 2024
4669146
Include comments in LDAP BBEs
Nuvindu Aug 13, 2024
793aa43
Update XSLT module version
daneshk Aug 13, 2024
62a614f
Update openapi version
lnash94 Aug 13, 2024
b93fef0
Improve the code in the LDAP add/remove BBE
Nuvindu Aug 13, 2024
bfa7a0c
Merge pull request #5579 from daneshk/2201.10.x
daneshk Aug 13, 2024
ea78221
Fix a typo in a BBE description
Nuvindu Aug 13, 2024
fc739a3
Update BBEs for AccessLog Improvements
AzeemMuzammil Jul 11, 2024
f7e51a7
Address review comments
AzeemMuzammil Jul 16, 2024
0c09ca0
Address review comments
AzeemMuzammil Aug 9, 2024
117b831
Merge pull request #5582 from AzeemMuzammil/fb-access-log-bbe
TharmiganK Aug 14, 2024
9eaf626
Add Server-Sent Events BBE
MohamedSabthar Aug 14, 2024
0bc6ba5
Merge pull request #5584 from MohamedSabthar/2201.10.x
MohamedSabthar Aug 14, 2024
726de72
Merge pull request #5580 from lnash94/u10-libs-version
lnash94 Aug 14, 2024
789392a
Update stlibs version
lnash94 Aug 14, 2024
4b1ab4a
Removed unused validator java dependency
lnash94 Aug 15, 2024
df47435
Merge branch '2201.10.x' into u10-libs-version
lnash94 Aug 15, 2024
05e64bb
Merge pull request #5586 from lnash94/u10-libs-version
LakshanWeerasinghe Aug 15, 2024
b30e9aa
Apply review suggestions for LDAP BBEs
Nuvindu Aug 15, 2024
7adc890
Update related links in LDAP BBEs
Nuvindu Aug 15, 2024
beb07e4
Merge pull request #5578 from Nuvindu/2201.10.0-stage
Nuvindu Aug 20, 2024
d22bac7
Add yaml to anydata sample
LakshanWeerasinghe Aug 1, 2024
767dab1
Add yaml to anydata with projection bbe
LakshanWeerasinghe Aug 1, 2024
7f834b1
Add anydata to yaml string bbe
LakshanWeerasinghe Aug 1, 2024
c4efafa
Add yaml bbes to index.json
LakshanWeerasinghe Aug 1, 2024
3983e6e
Address review suggestions
LakshanWeerasinghe Aug 6, 2024
a6e6b79
Update samples with string templates
LakshanWeerasinghe Aug 6, 2024
cec25ae
Address review suggestions
LakshanWeerasinghe Aug 15, 2024
8d08940
Address review suggestions
LakshanWeerasinghe Aug 20, 2024
04f3a99
Disable output verification for xml-from-record-conversion
LakshanWeerasinghe Aug 20, 2024
167611a
Update lib dependencies
lnash94 Aug 20, 2024
97a067b
Update persist tool and dev tools dependencies
lnash94 Aug 20, 2024
879b85f
Address review suggestions
LakshanWeerasinghe Aug 21, 2024
44dec33
Add u10 licence
LakshanWeerasinghe Aug 21, 2024
e4388f4
Add client invocation tip for SSE server
TharmiganK Aug 21, 2024
6a2f38e
Apply suggestions from code review
TharmiganK Aug 21, 2024
aa7d4fd
Merge pull request #5593 from LakshanWeerasinghe/u10-licenece
LakshanWeerasinghe Aug 21, 2024
7a574c6
Merge pull request #5591 from lnash94/u10-libs-version
LakshanWeerasinghe Aug 21, 2024
b042db2
Merge pull request #5594 from ballerina-platform/update-sse-bbe-10-stage
MohamedSabthar Aug 21, 2024
70d6048
Update the xmldata version
LakshanWeerasinghe Aug 21, 2024
8d59852
Merge pull request #5590 from LakshanWeerasinghe/data.yaml-bbes-10.x
LakshanWeerasinghe Aug 21, 2024
bab4ef2
Update obeserve module version
LakshanWeerasinghe Aug 21, 2024
8fe25b6
Merge pull request #5597 from LakshanWeerasinghe/u10-licenece
LakshanWeerasinghe Aug 21, 2024
e6d6659
Update c2c version
LakshanWeerasinghe Aug 21, 2024
7fec2b0
Update GraphQL query complexity BBE
DimuthuMadushan Aug 21, 2024
be139f9
Merge pull request #5598 from LakshanWeerasinghe/u10-licenece
LakshanWeerasinghe Aug 21, 2024
1fc42d2
Merge pull request #5599 from DimuthuMadushan/2201.10.0-stage
MohamedSabthar Aug 21, 2024
b3cb085
Merge branch 'master' into 2201.10.0-stage
LakshanWeerasinghe Aug 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public void openapiAnnotationExistsTest() {
.resolve("cache")
.resolve("ballerina")
.resolve("openapi")
.resolve("2.0.0")
.resolve("2.1.0")
.resolve("bir");

Path jarPath = TEST_DISTRIBUTION_PATH
Expand All @@ -61,18 +61,7 @@ public void openapiAnnotationExistsTest() {
.resolve("cache")
.resolve("ballerina")
.resolve("openapi")
.resolve("2.0.0")
.resolve("java17");

Path balaPath = TEST_DISTRIBUTION_PATH
.resolve(DIST_NAME)
.resolve("repo")
.resolve("bala")
.resolve("ballerina")
.resolve("openapi")
.resolve("2.0.0")
.resolve("java17")
.resolve("platform")
.resolve("2.1.0")
.resolve("java17");

Path breLibPath = TEST_DISTRIBUTION_PATH
Expand All @@ -94,8 +83,7 @@ public void openapiAnnotationExistsTest() {
.resolve("lib");

Assert.assertTrue(Files.exists(birPath));
Assert.assertTrue(Files.exists(balaPath));
Assert.assertTrue(Files.exists(jarPath.resolve("ballerina-openapi-2.0.0.jar")));
Assert.assertTrue(Files.exists(jarPath.resolve("ballerina-openapi-2.1.0.jar")));
Assert.assertNotNull(TestUtils.findFileOrDirectory(breLibPath, "openapi-cli-"));
Assert.assertNotNull(TestUtils.findFileOrDirectory(breLibPath, "openapi-validator-"));
Assert.assertNotNull(TestUtils.findFileOrDirectory(breLibPath, "ballerina-to-openapi-"));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// AUTO-GENERATED FILE.
// This file is auto-generated by the Ballerina OpenAPI tool.

import ballerina/http;

listener http:Listener ep0 = new (80, config = {host: "petstore.openapi.io"});
Expand All @@ -10,7 +11,7 @@ service /v1 on ep0 {
# + 'limit - How many items to return at one time (max 100)
# + return - returns can be any of following types
# http:Ok (An paged array of pets)
# http:Response (unexpected error)
resource function get pets(int:Signed32? 'limit) returns Pets|http:Response {
# http:DefaultStatusCodeResponse (unexpected error)
resource function get pets(int:Signed32? 'limit) returns Pets|ErrorDefault {
}
}
430 changes: 226 additions & 204 deletions ballerina/LICENSE

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The `graphql:Client` can connect to a service that is secured with self-signed JWT by adding the `Authorization: Bearer <token>` header by passing the `graphql:JwtIssuerConfig` to the `auth` configuration of the client. A self-signed JWT is issued before the request is sent.

::: code graphql_client_security_authentication.bal :::
::: code graphql_client_security_jwt_authentication.bal :::

## Prerequisites
- Run the GraphQL service given in the [JWT Auth service](/learn/by-example/graphql-service-jwt-auth/) example.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# GraphQL service - Query Complexity

a `graphql:Service` can be secured by limiting the complexity of the operations that can be executed. This can be done by setting a maximum complexity threshold for a given service. The query complexity is calculated by assigning a complexity value to each field in the GraphQL schema. The complexity of an operation is the sum of the complexity values of the fields in the operation.
A `graphql:Service` can be secured by limiting the complexity of the operations that can be executed. This can be done by setting a maximum complexity threshold for a given service. The query complexity is calculated by assigning a complexity value to each field in the GraphQL schema. The complexity of an operation is the sum of the complexity values of the fields in the operation.

::: code graphql_service_query_complexity.bal :::

Expand Down
2 changes: 2 additions & 0 deletions examples/http-sse-service/http_sse_service.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Invoke the service by executing the following cURL command in a new terminal.

::: out http_sse_service.client.out :::

>**Tip:** You can invoke the above service via the [Client server-sent events](/learn/by-example/http-sse-client/) example.

## Related links
- [`http` module - API documentation](https://lib.ballerina.io/ballerina/http/latest/)
- [Resource return types - Specification](/spec/http/#235-return-types)
23 changes: 23 additions & 0 deletions examples/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -3837,6 +3837,29 @@
}
]
},
{
"title": "LDAP client",
"column": 3,
"category": "Network libraries",
"samples": [
{
"name": "Add/Remove entries",
"url": "ldap-add-remove-entry",
"verifyBuild": true,
"verifyOutput": false,
"disablePlayground": true,
"isLearnByExample": false
},
{
"name": "Search for an entry",
"url": "ldap-search-entry",
"verifyBuild": true,
"verifyOutput": false,
"disablePlayground": true,
"isLearnByExample": false
}
]
},
{
"title": "JMS service",
"column": 3,
Expand Down
27 changes: 27 additions & 0 deletions examples/ldap-add-remove-entry/ldap_add_remove_entry.bal
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import ballerina/io;
import ballerina/ldap;

public function main() returns error? {
// Initializes a new LDAP client with credentials.
ldap:Client ldapClient = check new (
hostName = "localhost",
port = 389,
domainName = "cn=admin,dc=example,dc=com",
password = "adminpassword"
);

// Creates an `ldap:Entry` record for the new entry.
ldap:Entry addEntry = {
"objectClass": ["top", "person"],
"sn": "user",
"cn": "user"
};

// Adds an entry to the directory server.
ldap:LdapResponse addResponse = check ldapClient->add("cn=user,dc=example,dc=com", addEntry);
io:println("Add Response: ", addResponse.resultCode);

// Deletes an entry from the directory server.
ldap:LdapResponse deleteResponse = check ldapClient->delete("cn=user,dc=example,dc=com");
io:println("Delete Response: ", deleteResponse.resultCode);
}
22 changes: 22 additions & 0 deletions examples/ldap-add-remove-entry/ldap_add_remove_entry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# LDAP client - Add/Remove entries

The `ldap:Client` connects to a directory server and performs various operations on directories. Currently, it supports the generic LDAP operations; `add`, `modify`, `modifyDN`, `compare`, `search`, `searchWithType`, `delete`, and `close`.

The `add` operation creates a new entry in a directory server. It requires a `DN` (Distinguished Name) for the entry and the attributes to be included. The `objectClass` attribute must be specified to define the object classes for the entry, and any attributes required by these object classes should also be included.

The `delete` operation removes an entry from a directory server. It requires a `DN` (Distinguished Name) of the entry to be deleted.

::: code ldap_add_remove_entry.bal :::

## Prerequisites
- Ensure that an LDAP server is up and running locally on port 389 while running the example.

- Run the example by executing the command below.

::: out ldap_add_remove_entry.server.out :::

## Related links
- [`ldap:Client` `add` operation - API documentation](https://central.ballerina.io/ballerina/ldap/latest#Client-add)
- [`ldap:Client` `delete` operation - API documentation](https://central.ballerina.io/ballerina/ldap/latest#Client-delete)
- [`ldap` module - API documentation](https://lib.ballerina.io/ballerina/ldap/latest/)
- [`ldap:Client` - Specification](/spec/ldap/#2-ldap-client)
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
description: This example is on how to create/delete entries in a directory server using LDAP in Ballerina.
keywords: ballerina, ballerina by example, bbe, ldap, add
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
$ bal run ldap_add_remove_entry.bal
Add Response: SUCCESS
Delete Response: SUCCESS
20 changes: 20 additions & 0 deletions examples/ldap-search-entry/ldap_search_entry.bal
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import ballerina/io;
import ballerina/ldap;

public function main() returns error? {
// Initializes a new LDAP client with credentials.
ldap:Client ldapClient = check new (
hostName = "localhost",
port = 389,
domainName = "cn=admin,dc=example,dc=com",
password = "adminpassword"
);

// Searches for an entry in the directory server.
ldap:SearchResult searchResult = check ldapClient->search(
"cn=user,dc=example,dc=com",
"(sn=user)",
ldap:SUB
);
io:println("Search Response: ", searchResult.resultCode);
}
25 changes: 25 additions & 0 deletions examples/ldap-search-entry/ldap_search_entry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# LDAP client - Seacrh for an entry

The `ldap:Client` connects to a directory server and performs various operations on directories. Currently, it supports the main LDAP operations; `add`, `modify`, `modifyDN`, `compare`, `search`, `searchWithType`, `delete`, and `close`.

The `search` operation is used to retrieve entries that match specified criteria. The components of an LDAP search request include:

- `baseDN`: Defines the base of the subtree for the search.
- `filter`: Specifies the criteria that entries must meet.
- `scope`: Determines extent of the the search coverage within the subtree.

When a directory server processes a valid search request, it finds entries within the defined scope that meet the filter criteria. The matching entries are then returned to the client in a `ldap:SearchResult` record.

::: code ldap_search_entry.bal :::

## Prerequisites
- Ensure that an LDAP server is up and running locally on port 389 while running the example.

- Run the example by executing the command below.

::: out ldap_search_entry.server.out :::

## Related links
- [`ldap:Client` `search` operation - API documentation](https://central.ballerina.io/ballerina/ldap/latest#Client-search)
- [`ldap` module - API documentation](https://lib.ballerina.io/ballerina/ldap/latest/)
- [`ldap:Client` - Specification](/spec/ldap/#2-ldap-client)
2 changes: 2 additions & 0 deletions examples/ldap-search-entry/ldap_search_entry.metatags
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
description: This example is on how to search for an entry in a directory server using LDAP in Ballerina.
keywords: ballerina, ballerina by example, bbe, ldap, search
2 changes: 2 additions & 0 deletions examples/ldap-search-entry/ldap_search_entry.server.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
$ bal run ldap_search_entry.bal
Search Response: SUCCESS
77 changes: 39 additions & 38 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ group=org.ballerinalang
version=2201.10.0-SNAPSHOT
codeName=swan-lake

ballerinaLangVersion=2201.10.0-20240722-112100-1b113f29
ballerinaLangVersion=2201.10.0
ballerinaJreVersion=2.0.0
dependencyJREVersion=jdk-17.0.7+7-jre
specVersion=2024R1
Expand All @@ -18,82 +18,83 @@ stdlibJavaArraysVersion=1.4.0
stdlibTimeVersion=2.4.0
stdlibUrlVersion=2.4.0
stdlibXmldataVersion=2.8.0
observeVersion=1.2.3
observeVersion=1.3.0
stdlibMathVectorVersion=1.0.2
stdlibLdapVersion=1.0.0
stdlibLdapVersion=1.0.1

# Stdlib Level 02
stdlibAvroVersion=1.0.0
stdlibConstraintVersion=1.5.0
stdlibCryptoVersion=2.7.2
stdlibDataXmldataVersion=0.1.4
stdlibLogVersion=2.9.0
stdlibDataXmldataVersion=1.0.0
stdlibLogVersion=2.10.0
stdlibOsVersion=1.8.0
stdlibProtobufVersion=1.6.0
stdlibPersistVersion=1.3.0
stdlibPersistVersion=1.4.0
stdlibRandomVersion=1.5.0
stdlibTaskVersion=2.5.0
stdlibXsltVersion=2.6.0
observeInternalVersion=1.2.2
stdlibXsltVersion=2.7.0
observeInternalVersion=1.3.0

# Stdlib Level 03
stdlibCacheVersion=3.8.0
stdlibFileVersion=1.9.0
stdlibFtpVersion=2.10.1
stdlibMimeVersion=2.10.0-20240724-124600-f193322
stdlibTcpVersion=1.10.0
stdlibUdpVersion=1.10.0
stdlibFileVersion=1.10.0
stdlibFtpVersion=2.11.0
stdlibMimeVersion=2.10.0
stdlibTcpVersion=1.11.0
stdlibUdpVersion=1.11.0
stdlibUuidVersion=1.8.0

# Stdlib Level 04
stdlibAuthVersion=2.11.0
stdlibDataJsondataVersion=0.1.0
stdlibDataYamlVersion=0.1.0-20240805-142200-476565f
stdlibEdiVersion=1.2.0
stdlibEmailVersion=2.9.0
stdlibJwtVersion=2.12.1
stdlibMqttVersion=1.1.1
stdlibOAuth2Version=2.11.0
stdlibTomlVersion=0.5.1
stdlibYamlVersion=0.5.3
stdlibAuthVersion=2.12.0
stdlibDataJsondataVersion=0.2.0
stdlibDataYamlVersion=0.1.0
stdlibEdiVersion=1.3.0
stdlibEmailVersion=2.10.0
stdlibJwtVersion=2.13.0
stdlibMqttVersion=1.2.0
stdlibOAuth2Version=2.12.0
stdlibTomlVersion=0.6.0
stdlibYamlVersion=0.6.0

# Stdlib Level 05
stdlibHttpVersion=2.12.0-20240801-081400-0b676d6
stdlibHttpVersion=2.12.0


# Stdlib Level 06
stdlibGrpcVersion=1.11.1
stdlibSoapVersion=1.0.0
stdlibTransactionVersion=1.9.0
stdlibWebsocketVersion=2.11.0
stdlibWebsubVersion=2.11.0
stdlibWebsubhubVersion=1.11.0
stdlibGrpcVersion=1.12.0
stdlibSoapVersion=1.1.0
stdlibTransactionVersion=1.10.0
stdlibWebsocketVersion=2.12.0
stdlibWebsubVersion=2.12.0
stdlibWebsubhubVersion=1.12.0

# Stdlib Level 07
stdlibGraphqlVersion=1.14.0-20240801-114000-e4337a2
stdlibSqlVersion=1.13.0
stdlibGraphqlVersion=1.14.0
stdlibSqlVersion=1.14.0

# Persist Tool
persistToolVersion=1.3.0
persistToolVersion=1.4.0

# Dev Tools
devToolsVersion=1.4.0
devToolsVersion=1.5.0
ballerinaCommandVersion=1.4.2

# API Doc UI
docUiApi=https://api.dev-central.ballerina.io/2.0/docs/doc-ui

# GraphQL Tool
graphqlToolVersion=0.10.0
graphqlToolVersion=0.11.0

# Protoc Tool
protocToolVersion=0.3.0

# OpenAPI Module
openapiToolVersion=2.0.0
openapiToolVersion=2.1.0

# AsyncAPI Module
asyncapiToolVersion=0.8.0
asyncapiToolVersion=0.9.0

c2cVersion=3.0.0
c2cVersion=3.1.0

installerVersion=f7b952b2-f64b-45f0-ab86-df7d892ffc21
Loading