Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement to support the httpd authentication configuration map. #201

Merged
merged 7 commits into from
Aug 29, 2017

Conversation

abellotti
Copy link
Member

  • Added new httpd-auth-configs config map to the templates
  • mounted the new configmap for httpd pod as /etc/httpd/auth-conf.d
  • updated teardown script to handle the new config map

- Added new httpd-auth-configs config map to the templates
- mounted the new configmap for httpd pod as /etc/httpd/auth-conf.d
- updated teardown script to handle the new config map
@carbonin
Copy link
Member

@abellotti Can you add something to the README about how to specify the other external auth files? Should they be added to the same ConfigMap?

Also, is any guidance needed around what files should be added for which authentication types?

@abellotti
Copy link
Member Author

Stuff here should be generic, I can move the config map/config file syntax out of the templates into the README and maybe give a single example. Yes, they go to the same httpd-auth-configs map.

The guidance/list of files generated for each auth type will go in the new repo (scripts configuring the different ext-auth and creating the configmap that users can update here and restart their httpd pod), probably ManageIQ/container-httpd-auth-config, coming soon.

@carbonin
Copy link
Member

will go in the new repo

Ah, I didn't know there was more. My concern was that this felt like we were leaving too much up to the user to figure out how to configure this stuff. It sounds like this repo will accomplish what I was looking for.

In that case a link from the README here to that repo with a sentence or two will probably be enough.

…ile.

- Updated template's Auth Configmap usage details to reference the README file.
@abellotti
Copy link
Member Author

abellotti commented Aug 18, 2017

/cc @carbonin updated for you. simplified config maps, referencing this pod's README which has all details, with reference to future container-httpd-auth-config repo for auto-generating those puppies.

README.md Outdated
$ oc edit configmaps httpd-auth-configs
```

Then rebouncing the _httpd_ pod for the new authentication configuration to take effect.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think "redeploy the httpd pod" or "rollout a new httpd deployment" here rather than "rebouncing the httpd pod"

@@ -963,6 +978,10 @@ parameters:
displayName: Apache Configuration Directory
description: Directory used to store the Apache configuration files.
value: "/etc/httpd/conf.d"
- name: HTTPD_AUTH_CONFIG_DIR
displayName: External Authentication Configuration Directory
description: Directory used to store the exxternal authentication configuration files.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo, s/exxternal/external/

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 fixed.

Copy link
Member

@carbonin carbonin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Do we want to wait until we have the other referenced repo in place for this change?

@carbonin carbonin requested a review from bdunne August 18, 2017 19:16
@abellotti
Copy link
Member Author

hmm, might take a week or two to get the other repo up. I do need this merged in now though. I could remove the reference for now until the other is live, then re-add that paragraph in the README.md then, thoughts ?

@carbonin
Copy link
Member

Yeah, I think that's probably for the best.

When we have the other repo up and running we'll re-add the info about it.

…d-auth-config. We will

re-add once that repo/pod is available.

  Removed text:

    Support for automatically generating authentication configuration maps for _httpd_ will be provided by
    [ManageIQ/container-httpd-auth-config](https://github.com/ManageIQ/container-httpd-auth-config).
    Please see the [README.md](https://github.com/ManageIQ/container-httpd-auth-config/blob/master/README.md)
    in that repo for further details.

    The generated authentication configuration map can then be defined in the _httpd_ pod
    and further customized as follows:

    ```bash
      $ oc edit configmaps httpd-auth-configs
    ```
@abellotti
Copy link
Member Author

👍 done. 7d783ba

@abellotti
Copy link
Member Author

ping @bdunne

@abellotti abellotti changed the title Enhancement to support the httpd authentication configuration map. [WIP] Enhancement to support the httpd authentication configuration map. Aug 25, 2017
@miq-bot miq-bot added the wip label Aug 25, 2017
- kick off the /usr/bin/entrypoint via a postStart lifecycle hook.
- declare the authentication type as a config map auth-type key.
- expose the auth-type key as an HTTPD_AUTH_TYPE environment variable.

Updated README.md for the auth config map changes.
@abellotti abellotti changed the title [WIP] Enhancement to support the httpd authentication configuration map. Enhancement to support the httpd authentication configuration map. Aug 25, 2017
@miq-bot miq-bot removed the wip label Aug 25, 2017
README.md Outdated
@@ -541,3 +541,100 @@ $ oc new-app --template=manageiq \
-p APPLICATION_IMG_TAG=latest \
...
```

## Configuring External Authentication
Configuring the _httpd_ pod for external authentication is done by updating the _httpd-auth-configs_ configuration map to include all necessary config files and certificates. Upon startup, the _httpd_ pod overlays its files with the ones specified in the _auth-configuration.conf_ file in the configuration map. This is done by the _initialize-httpd-auth_ service that runs before _httpd_.
Copy link
Member

@Fryguy Fryguy Aug 25, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of italics can you use backticks, to make it preformatted? I find it hard to read with italics. (pretty much everywhere in these changes

auth-configuration.conf: |
# External Authentication Configuration File
#
# For details on usage please see https://github.com/ManageIQ/manageiq-pods/blob/master/README.md
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can actually link directly to your new section with :

https://github.com/ManageIQ/manageiq-pods/blob/master/README.md#configuring-external-authentication

@miq-bot
Copy link
Member

miq-bot commented Aug 29, 2017

Checked commits abellotti/manageiq-pods@7abe98b~...6465faa with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
0 files checked, 0 offenses detected
Everything looks fine. ⭐

Copy link
Member

@carbonin carbonin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More approval from me. Anything you want to add @Fryguy @bdunne ?

@Fryguy
Copy link
Member

Fryguy commented Aug 29, 2017

LGTM

@carbonin carbonin self-assigned this Aug 29, 2017
@carbonin carbonin added this to the Sprint 68 Ending Sep 4, 2017 milestone Aug 29, 2017
@carbonin carbonin merged commit a781640 into ManageIQ:master Aug 29, 2017
@abellotti abellotti deleted the ext-auth-configmap branch September 8, 2017 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants