She had been keeping it secret that she'd worked as a saleswoman.

Literal

She [topic-は] [salesperson was-だった] [nominalizer-こと] [object-を] [kept-secret-秘密にしていた].

~ことを秘密にする ('keep ~ secret') uses the productive 'noun + にする' pattern: 'make it a secret.' 売り子 ('shop assistant, vendor') has a slightly old-fashioned, working-class flavor. The whole past-marriage proposition is nominalized with こと.