I think a more accurate "meaning" is there is a limit to how [long] [strong]. On another note, I prefer to place 'only' as close as possible to what it is modifying. The meaning is seldom misunderstood as you have it, but more precise renditions are: You can keep your secret for only so long.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.