How to get the configurable attributes of a configurable product?

A post was split to a new topic: How get options on out of stock products on front scope?