I need to use Data Cubes to analyse the Sales Performance. Since the product costs are highly confidential it should not be exposed to the middle management. However, the other information needs to be published to the middle management. Is there a feature in SSAS that could enable this requirement?
This is an overly broad question but SSAS has security features that allow you to shield data for certain users.
You should look into Roles and Permissions.
Since you are talking about shielding costs you probably just want to limit access to certain measures so you're probably looking for Grant custom access to cell data which limit access to the values:
Cell security is used to allow or deny access to measure data within a cube. Cell permissions apply to data inside the cell, and not to its metadata. Notice how the cell is still visible in the results of a query, displaying a value of #N/A instead of the actual cell value.
If you want to hide the fact that the measure exists you need to look at Grant custom access to dimension data
In Grant custom access to cell data (Analysis Services), it was explained that fully hiding all visual aspects of a measure, and not just its cell data, requires permissions on dimension members. This section explains how to deny access to the object metadata of a measure.