This may need to go to a developer forum but this is the best place for now.
By creating a data source filter, you can actually use the user's login credentials to determine the data they can see. This can tie back to the user's groups in Tableau, or the user's individual username on Tableau.
Essentially, you will create a calculated field to determine if the user should see the data or not.
When creating a server hosted extract, you will want to apply this field as a datasource filter, but NOT an extract filter. (Very important)
You can also tie the Tableau Server login credentials to Active Directory, if you would like to use those credentials for the users to login.
Hope this helps!
According to your requirement, You want use should authentication at data source level as well right ? If yes, Below mentioned should the solution for your requirement.
You can use Prompt user option to prompt the auth while connecting to Data sources.
Let me know if this has help you.
Atul Vitthal Yadav