![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
A node library to implement an OSB broker which can register multiple OSB services
api/OSB.js
: broker class which allow clients to register OSB services.
app
- REQUIRED: express apposbPath
- REQUIRED: base path for OSB endpointscontextBuilder
- OPTIONAL: function to build context for each requestsapi/OSBService
: represent an OSB service which handle OSB requests. Each OSBService
needs to implement below functions to handle OSB requests for the service.
getServiceInfo
: return service infoprovisionServiceInstance
: async function to provision service instanceupdateServiceInstance
: async function to update service instancedeprovisionServiceInstance
: async function to deprovision service instancebindService
: async function to bind serviceunbindService
: async function to unbind servicepollLastOperation
: async function to get last operation status{
statusCode: 'the-http-status-code',
data: 'the response'
}
api/model/*
: model classes represent OSB responsesapi/model/request/*
: model classes represent OSB request paramsconst express = require('express');
const osbNode = require('osb-node');
const OSB = osbNode.OSB;
const OSBService = osbNode.OSBService;
const app = express();
const broker = new OSB(app, {osbPath: osbPath, contextBuilder: function(httpRequest){
return {key: 'value};
});
broker.registerService(new OSBService({
getServiceInfo,
provisionServiceInstance,
updateServiceInstance,
deprovisionServiceInstance,
bindService,
unbindService,
pollLastOperation
}));
broker.start();
const Plan = osbOnode.modelPlan;
const Schemas = osbOnode.modelSchemas;
const ServiceBindingSchema = osbOnode.modelServiceBindingSchema;
const Service = osbOnode.modelService;
const ServiceInstanceSchema = osbOnode.modelServiceInstanceSchema;
function getServiceInfo(request, context) {
return new Service({
name: 'service-a',
id: 'service-id',
description: 'service A',
tags: ['tag', 'osb'],
requires: ['route_forwarding'],
bindable: true,
metadata: {
displayName: 'Service 1',
provider: {
name: 'provider name'
}
},
dashboard_client: new DashboardClient({
id: '7545b455-9cdb-41d2-abf3-3a4bae383a43',
secret: '277cabb0-XXXX-XXXX-XXXX-7822c0a90e5d',
redirect_uri: 'http://localhost:1234'
}),
plan_updateable: true,
plans: [new Plan({
id: 'ab3eb1db-26d7-429a-850a-daeb667e0530',
name: 'plan-1',
description: 'description',
metadata: {
max_storage_tb: 5,
costs: [{
amount: {
usd: 99.0
},
unit: 'MONTHLY'
}, {
amount: {
usd: 0.99
},
unit: '1GB of messages over 20GB'
}],
bullets: [
'Shared fake server',
'5 TB storage',
'40 concurrent connections'
]
},
schemas: new Schemas({
service_instance: new ServiceInstanceSchema({
create: new InputParameters({
parameters: {
'$schema': 'http://json-schema.org/draft-04/schema#',
'type': 'object',
'billing-account': {
description: 'Billing account number used to charge use of shared fake server.',
type: 'string'
}
}
}),
update: new InputParameters({
parameters: {
'$schema': 'http://json-schema.org/draft-04/schema#',
'type': 'object',
'billing-account': {
description: 'Billing account number used to charge use of shared fake server.',
type: 'string'
}
}
})
}),
service_binding: new ServiceBindingSchema({
create: new InputParameters({
parameters: {
'$schema': 'http://json-schema.org/draft-04/schema#',
'type': 'object',
'billing-account': {
description: 'Billing account number used to charge use of shared fake server.',
type: 'string'
}
}
})
})
})
}, new Plan({
id: '11f48b05-e3f3-4265-bdf7-6a0c58dbc9bf',
name: 'plan-2',
description: 'Shared fake Server, 5tb persistent disk, 40 max concurrent connections. 100 async',
free: false,
metadata: {
max_storage_tb: 5,
costs: [{
amount: {
usd: 199.0
},
unit: 'MONTHLY'
}, {
amount: {
usd: 0.99
},
unit: '1GB of messages over 20GB'
}],
bullets: [
'40 concurrent connections'
]
}
}))]
});
}
const ProvisionResponse = osbNode.model.ProvisionResponse;
function provisionServiceInstance(request, context) {
return {
statusCode: '200',
data: new ProvisionResponse({dashboard_url: 'https://service-dashboard', operation: 'provision'});
}
}
const LastOperation = osbNode.model.LastOperation;
new LastOperation({state: 'in progress', description: 'provisioning instance'});
const BrokerError = osbNode.model.BrokerError;
new BrokerError({error: 'invalid request', description: 'service id is required'});
More details are in test-app.js
Please see CODE_OF_CONDUCT.md
Please see CONTRIBUTING.md
We license this project under the Apache License 2.0, as per our LICENSE.txt
[0.1.3] - 2022-11-23
FAQs
OSB nodejs module
The npm package osb-node receives a total of 4 weekly downloads. As such, osb-node popularity was classified as not popular.
We found that osb-node demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.