Comments (3)
The call to License
and LicensePath
are explicit configuration call. It is expected that data is present. If a license is corrupt or expired we still start but without data we consider this a configuration error.
Since the longstanding principle of NSB has been to not prevent running of an endpoint if a license is not provided,
If no (valid) license is found by our license scanning heuristics or the passed license is invalid we still start. The difference is in the word "provided" vs "present". Invoking License
and LicensePath
is explicitly selecting that license data to use.
You're asking that if there is no data we should ignore those calls.
If there is not data the user should not invoke those methods:
if (!string.IsNullOrEmpty(licenseText))
{
endpointConfiguration.License(licenseText);
}
or
if (!File.Exist(licensePath))
{
endpointConfiguration.LicensePath(licensePath);
}
or
if (!File.Exist(licensePath))
{
var licenseText = File.ReadAllText(licensePath);
if (!string.IsNullOrEmpty(licenseText))
{
endpointConfiguration.LicensePath(licensePath);
}
}
The difference is more in an explicit configuration using License
and LicensePath
versus implicit license loading.
@dbelcham Do you have more information as currently it seems that just ignoring an explicit decision by the user if not the right approach.
from nservicebus.
We use the call to License(string)
because we are pulling the license value from a centralized configuration system (Azure App Config and Key Vault in our case). We have many different environments in our development work (DEV/UAT/PROD/etc) and each of those environments has it's own centralized configuration stores. As we progress through our environments towards production, the restrictions around who has access to the configuration stores becomes more and more restricted. Because the lower environments are widely accessible we do not want to put our production license into them where it can be taken/leaked much more easily due to the less restricted nature of that environment.
As such, we rely on NSB's licensing which allows us to run in any non-production environment without a full license. Our expectation is that we can have the exact same code in each of our environments (i.e. no conditional saying "use License(string)
only if this is production") and that the endpoints should successfully start in any of those environments, whether the license is in the configuration store or not. Our expectation is that when an empty or null license is pulled from the configuration store the endpoint will behave as if it has not been provided a license.
It seems like a very leaky abstraction that we need to add a conditional check for what our license value is when we retrieve it and then we have to decide how NSB should behave when the license is not available. This isn't our application's concern. This is an NSB concern that should be fully encapsulated with in the apis that NSB provides.
from nservicebus.
We triaged this issue and concluded that this is not a bug.
We classify this as a small improvement and it will be considered in a future maintenance release.
from nservicebus.
Related Issues (20)
- For OpenTelemetry metrics, allow Func<string, string> to be specified to trim the enclosed message types tag HOT 6
- Saga and outbox persistence that uses Entity Framework
- Overriding the host name does not work consistently
- AssemblyScanner finds private classes HOT 1
- Obsolete NServiceBus.Logging
- DefineCriticalErrorAction access to IServiceProvider HOT 3
- Support for Azure Event Hubs (Kafka) HOT 1
- Support for Azure Event Grid (MQTT)
- Messages cannot be sent from Windows to Linux using the file share data bus HOT 1
- Creating an endpoint and not referencing the instance results in memory/resource leak HOT 1
- Add tests for scenarios without `InstallersEnabled`
- Allow user to define the scope of a trace HOT 1
- Dispatch binary messages in incoming message context via `ReadOnlyMemory<Char>` or `Stream`
- Register multiple serializers for outgoing messages
- Customizable envelope formatting (Integration, standardization, interop)
- Make it easier to use the hosting builder from Microsoft.Extensions.Hosting
- `IMessageSerializer` is not registered in DI and cannot be injected when replacing `SerializeMessageConnector`
- OpenTelemetry Metrics: Emit an UpDownCounter (gauge) for active handlers
- OpenTelemetry: Create a span when a message is moved to the error queue.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nservicebus.