In a previous post I described the different parts of NosDB Security in terms of realms, logins, users, authentication and authorizations. Here I will present a practical perspective of how to assign security privileges to users across realms.
But before we begin I want to briefly touch-back on what we have learned.
- Realms: There are 3 realms in NosDB security. These realms are logical entities. The System Realm grants read-only access to the infrastructure. The Cluster Realm is where all the active participating machines are. The Database Realm is where you need to be to access the database.
- Logins: Logins grant you access to the System Realm. Logins can be authenticated using either Windows Authentication or the built-in NosDB authentication.
- Users: To perform any action either on the cluster or the database, users are created with a login.
Now that we have the basics defined, let’s take a look at how you would restrict or grant access to your data, based on users. Security Roles are what you assign to users to provide access/permissions to different parts of NosDB. There are three types of security roles in NosDB.
NoSQL provides you with a framework where you have complete schema flexibility and you are free to decide your own data model. Complete flexibility offers so much that it’s also easy to make a mistake such as adding a Product JSON document into a Customer Collection. Yikes!
Corralling this much flexibility can be useful as noted in an article written under the heading
Triggers in a .NET NoSQL Database. The article did an awesome job presenting a basic use case to validate data with Triggers, which I build upon in this document. Here I present a ‘customizable Triggers application’ for you to download. It is presented under the Apache 2.0 License.
With the advent of schema-less databases, things have become a bit more interesting in how you query the data. Most NoSQL databases invented their own query languages. NosDB – a native .NET NoSQL database on the other hand uses standard SQL to make you feel right at home. But wait! There is another way that you can query your data, and that is through LINQ.
LINQ helps you reduce the amount of code you write and is also easy to learn. It helps you bridge the gulf between strongly typed programming languages and databases. More importantly, LINQ helps you to be more productive. Continue reading
In recent times as the need for large, organized and especially reliable data stores has increased, so has the need for easy management of these resources. It is inevitable that every business seeks databases that can hold their data and provide proper management tools to manage it. The job for the Database Administrators is already challenging, and with the switch from single node systems (residing on one server/machine) to clustered systems (residing on multiple machines/servers), managing resources can be very stressful. Now when you think about managing clustered database systems, you have to manage the databases, their respective properties, and also the clusters on which these databases reside.
NosDB solves this headache with “NosDB Management Studio”, allowing you to operate multiple machines from a single location, easily and efficiently. Before we proceed to how NosDB solves your problems let us briefly examine what NosDB is. NosDB is a clustered database system, which insures reliability by accommodating large amounts of data in databases, on different servers. A cluster in NosDB is comprised of shards on which the data is distributed on the basis of configurable distribution strategies. Each shard may have one or more replica nodes which replicate data of the shard. This works just like an internal fault tolerant backup system, so that you don’t have to worry about data losses. Explore more about clusters and their concepts with NosDB Conceptual Guide.
In this ever-evolving world, advancement in technology is accelerating at an extremely fast pace. Traditional databases have become far too slow, presenting serious bottlenecks, both in terms of speed and storage capacity. Therefore, the advent of a much needed replacement, the introduction of NoSQL, was seen as a life saver by many serious players out there.
Delving into this market, Alachisoft has also introduced its very own NoSQL document database for .NET, NosDB, released under the Apache 2.0 license. NosDB is a key-value store which takes string based values as keys and stores objects in the form of JSON against them. Being fast and extremely scalable, it makes for a good substitute for those wanting to shift from the legacy database systems. You can get started with the product following these five quick steps:
A database, as you may already know, is a collection of data stored in an organized way allowing you to retrieve it efficiently. While every typical .NET enterprise application incorporates a database, the data it stores is also usually accompanied by some files e.g. pictures, videos, documents etc.
In .NET applications, these files are treated as binary data and the best way to store them would also be in a database. In order to maintain relevance between the data and the files, traditionally you have two options:
- Either store the binary data in the related JSON document. For example, a customer object containing its picture
- Or store the files in your file-system (hard-disk) and keep links pointing to those files in your JSON document. For example, store customer object in the database and the picture separately in your hard-disk. Store the link to this picture in your customer object as well.
NosDB is a schema-less, scalable NoSQL database solution for .NET that accommodates immense volumes of unstructured data. Because NosDB provides availability and fault tolerance through sharding and distribution strategies, it concurrently generates a need to monitor the impact of operations on your system.
Hence, once NosDB has been deployed and databases are created, IT administrators need to continuously monitor the environment to diagnose and prevent any problems from aggravating in the future, like network choking, peaks in resource utilization and unauthorized access attempts. In addition to these problems, you will want to monitor NosDB to assess general status of load, node operation and cluster health.
Many companies value data more than hard cash. The reason is simple; Data generates business. With this much importance given to data, it should be obvious that database security should also be of utmost importance. Database security means involving multiple measures to protect your data from illegal access or worse; data theft. Those multiple measures include;
- Data Encryption
- Transport level encryption
- And more …
Publisher Subscriber design patterns are an invaluable tool for building enterprise grade .NET/C# applications. Among them you will be very familiar with the Publish-Subscribe pattern also known as Pub/Sub. Just to refresh your memory, Pub/Sub is basically a messaging pattern where the senders of messages (publisher) do not have any knowledge about the intended recipients as in, which applications are the receivers or how many of them are there. Also, the publishing and listening application do not interact with each other directly but instead depend on a common medium, without knowledge of the producer or consumers presence.
Businesses today are developing high traffic ASP.NET web applications that serve tens of thousands of concurrent users. To handle this type of load, multiple application servers are deployed in a load balanced environment. In such a highly concurrent environment, multiple users often try to access and modify the same data and trigger a race condition. A race condition is when two or more users try to access and change the same shared data at the same time but end up doing it in the wrong order. This leads to high risk of loosing data integrity and consistency. This is where distributed lock mechanism comes in very handy to achieve data consistency.